mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect.git
synced 2025-06-24 13:34:13 +08:00
35 lines
872 B
C#
35 lines
872 B
C#
using Avalonia;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Markup.Xaml;
|
|
using Avalonia.Media;
|
|
|
|
namespace detect.gui.Controls;
|
|
|
|
public partial class StateItem : UserControl
|
|
{
|
|
public static readonly StyledProperty<string> TextProperty =
|
|
AvaloniaProperty.Register<StateItem, string>(nameof(Text));
|
|
public string Text
|
|
{
|
|
get => GetValue(TextProperty);
|
|
set => SetValue(TextProperty, value);
|
|
}
|
|
|
|
public static readonly StyledProperty<IBrush?> ItemColorProperty =
|
|
AvaloniaProperty.Register<StateItem, IBrush?>(nameof(ItemColor));
|
|
public IBrush? ItemColor
|
|
{
|
|
get => GetValue(ItemColorProperty);
|
|
set => SetValue(ItemColorProperty, value);
|
|
}
|
|
|
|
public StateItem()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void InitializeComponent()
|
|
{
|
|
AvaloniaXamlLoader.Load(this);
|
|
}
|
|
} |