2024-02-05 23:08:37 -08:00
|
|
|
using Avalonia;
|
|
|
|
using Avalonia.Controls;
|
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
namespace SourceGit.Views
|
|
|
|
{
|
|
|
|
public partial class ChangeViewModeSwitcher : UserControl
|
|
|
|
{
|
2024-02-05 23:08:37 -08:00
|
|
|
public static readonly StyledProperty<Models.ChangeViewMode> ViewModeProperty =
|
|
|
|
AvaloniaProperty.Register<ChangeViewModeSwitcher, Models.ChangeViewMode>(nameof(ViewMode));
|
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
public Models.ChangeViewMode ViewMode
|
|
|
|
{
|
2024-02-05 23:08:37 -08:00
|
|
|
get => GetValue(ViewModeProperty);
|
|
|
|
set => SetValue(ViewModeProperty, value);
|
|
|
|
}
|
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
public ChangeViewModeSwitcher()
|
|
|
|
{
|
2024-02-05 23:08:37 -08:00
|
|
|
DataContext = this;
|
|
|
|
InitializeComponent();
|
|
|
|
}
|
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
public void SwitchMode(object param)
|
|
|
|
{
|
2024-02-05 23:08:37 -08:00
|
|
|
ViewMode = (Models.ChangeViewMode)param;
|
|
|
|
}
|
|
|
|
}
|
2024-03-31 01:54:29 -07:00
|
|
|
}
|