using Avalonia; using Avalonia.Controls; using Avalonia.Input; using System.Windows.Input; using LehrerApp.Desktop.ViewModels; namespace LehrerApp.Desktop.Views; public partial class NavButton : UserControl { public static readonly StyledProperty IconProperty = AvaloniaProperty.Register(nameof(Icon), ""); public static readonly StyledProperty LabelProperty = AvaloniaProperty.Register(nameof(Label), ""); public static readonly StyledProperty ItemProperty = AvaloniaProperty.Register(nameof(Item)); public static readonly StyledProperty ActiveItemProperty = AvaloniaProperty.Register(nameof(ActiveItem)); public static readonly StyledProperty CommandProperty = AvaloniaProperty.Register(nameof(Command)); public static readonly StyledProperty CommandParameterProperty = AvaloniaProperty.Register(nameof(CommandParameter)); public string Icon { get => GetValue(IconProperty); set => SetValue(IconProperty, value); } public string Label { get => GetValue(LabelProperty); set => SetValue(LabelProperty, value); } public NavItem Item { get => GetValue(ItemProperty); set => SetValue(ItemProperty, value); } public NavItem ActiveItem { get => GetValue(ActiveItemProperty); set => SetValue(ActiveItemProperty, value); } public ICommand? Command { get => GetValue(CommandProperty); set => SetValue(CommandProperty, value); } public object? CommandParameter { get => GetValue(CommandParameterProperty); set => SetValue(CommandParameterProperty, value); } public NavButton() { InitializeComponent(); } }