* UISymbolButton: 设置完图片即可更新

This commit is contained in:
Sunny 2022-01-25 19:22:58 +08:00
parent 56221eef7d
commit 9989447771
4 changed files with 16 additions and 3 deletions

Binary file not shown.

Binary file not shown.

View File

@ -343,11 +343,14 @@ namespace Sunny.UI
{
get => image;
set
{
if (image != value)
{
image = value;
Invalidate();
}
}
}
private int _symbol = FontAwesomeIcons.fa_check;

View File

@ -150,11 +150,21 @@ namespace Sunny.UI
base.SetStyleColor(uiColor);
}
private Image image;
[DefaultValue(null)]
[Description("图片"), Category("SunnyUI")]
public Image Image
{
get; set;
get => image;
set
{
if (image != value)
{
image = value;
Invalidate();
}
}
}
private ContentAlignment imageAlign = ContentAlignment.MiddleCenter;