WIn_RustTools/RustTools/Themes/ButtonIcon.xaml.cs
2024-08-15 09:40:33 +08:00

32 lines
777 B
C#

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")); // ÉèÖÃĬÈÏÖµ
public event RoutedEventHandler Click
{
add
{
button.Click += value;
}
remove
{
button.Click -= value;
}
}
}