ImageButton & ImageSplitButton
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Svg;
|
||||
using Pilz.UI.Symbols;
|
||||
|
||||
@@ -19,6 +20,31 @@ public abstract class SymbolFactory<TSymbols> : BaseSymbolFactory<TSymbols>, ISy
|
||||
};
|
||||
}
|
||||
|
||||
public Image? GetImage(TSymbols image, double width, double height)
|
||||
{
|
||||
return new Image
|
||||
{
|
||||
Source = GetImageSource(image),
|
||||
Width = width,
|
||||
Height = height,
|
||||
};
|
||||
}
|
||||
|
||||
public Image? GetImage(TSymbols image, Avalonia.Size size)
|
||||
{
|
||||
return GetImage(image, size.Width, size.Height);
|
||||
}
|
||||
|
||||
public Image? GetImage(TSymbols image, System.Drawing.Size size)
|
||||
{
|
||||
return GetImage(image, size.Width, size.Height);
|
||||
}
|
||||
|
||||
public Image? GetImage(TSymbols image, SymbolSize size)
|
||||
{
|
||||
return GetImage(image, ResolveCommonSize(size));
|
||||
}
|
||||
|
||||
public ISymbolProxy GetImage(TSymbols image)
|
||||
{
|
||||
return new SymbolProxy<TSymbols>(this, image);
|
||||
|
||||
Reference in New Issue
Block a user