change UI to UI.WinForms

This commit is contained in:
2025-06-16 11:50:17 +02:00
parent fa3a9da07e
commit 299867a910
116 changed files with 318 additions and 319 deletions

View File

@@ -0,0 +1,23 @@
using Telerik.WinControls;
using Telerik.WinControls.Svg;
namespace Pilz.UI.WinForms.Telerik.Extensions;
public static class RadSvgImageExtensions
{
public static Image ToImage(this RadSvgImage svg)
{
return svg.Document.Draw(svg.Width, svg.Height);
}
public static void ApplyColor(this RadSvgImage svg, Color color)
{
svg.Document.Fill = new SvgColourServer(color);
svg.Document.ApplyRecursive(e =>
{
e.Fill = new SvgColourServer(color);
e.Stroke = new SvgColourServer(color);
});
svg.ClearCache();
}
}