WIn_RustTools/RustTools/Themes/ButtonIcon.xaml.cs

32 lines
777 B
C#
Raw Permalink Normal View History

2024-08-15 01:40:33 +00:00
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
namespace RustTools.Themes;
public sealed partial class ButtonIcon : UserControl
{
public ButtonIcon()
{
this.InitializeComponent();
DefaultStyleKey = typeof(ButtonIcon);
}
public string Glyph
{
get => (string)GetValue(GlyphProperty);
set => SetValue(GlyphProperty, value);
}
public static readonly DependencyProperty GlyphProperty =
DependencyProperty.Register("Glyph", typeof(string), typeof(ButtonIcon), new PropertyMetadata("\uE70A")); // <20><><EFBFBD><EFBFBD>Ĭ<EFBFBD><C4AC>ֵ
public event RoutedEventHandler Click
{
add
{
button.Click += value;
}
remove
{
button.Click -= value;
}
}
}