HeaderMenuItem
This commit is contained in:
24
Pilz.UI.AvaloniaUI/Dialogs/HeaderMenuItem.axaml.cs
Normal file
24
Pilz.UI.AvaloniaUI/Dialogs/HeaderMenuItem.axaml.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Pilz.UI.AvaloniaUI.Dialogs;
|
||||
|
||||
public partial class HeaderMenuItem : MenuItem
|
||||
{
|
||||
public static readonly StyledProperty<string?> HeaderTextProperty = AvaloniaProperty.Register<HeaderMenuItem, string?>(nameof(HeaderText));
|
||||
|
||||
public string? HeaderText
|
||||
{
|
||||
get => GetValue(HeaderTextProperty);
|
||||
set
|
||||
{
|
||||
SetValue(HeaderTextProperty, value);
|
||||
TextBlockHeader.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
public HeaderMenuItem()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user