This commit is contained in:
2026-03-29 23:47:31 +02:00
commit 216d5d2280
75 changed files with 5702 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
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<string> IconProperty =
AvaloniaProperty.Register<NavButton, string>(nameof(Icon), "");
public static readonly StyledProperty<string> LabelProperty =
AvaloniaProperty.Register<NavButton, string>(nameof(Label), "");
public static readonly StyledProperty<NavItem> ItemProperty =
AvaloniaProperty.Register<NavButton, NavItem>(nameof(Item));
public static readonly StyledProperty<NavItem> ActiveItemProperty =
AvaloniaProperty.Register<NavButton, NavItem>(nameof(ActiveItem));
public static readonly StyledProperty<ICommand?> CommandProperty =
AvaloniaProperty.Register<NavButton, ICommand?>(nameof(Command));
public static readonly StyledProperty<object?> CommandParameterProperty =
AvaloniaProperty.Register<NavButton, object?>(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();
}
}