Revert "feat: remove EnumSelector in demo."
This reverts commit f7dc4d35
This commit is contained in:
@@ -25,25 +25,6 @@ public partial class DialogDemoViewModel: ObservableObject
|
||||
[ObservableProperty] private DateTime? _date;
|
||||
[ObservableProperty] private bool _fullScreen;
|
||||
[ObservableProperty] private bool _showInTaskBar;
|
||||
|
||||
public ObservableCollection<DialogButton> DialogButtons =>
|
||||
[
|
||||
DialogButton.None,
|
||||
DialogButton.OK,
|
||||
DialogButton.OKCancel,
|
||||
DialogButton.YesNo,
|
||||
DialogButton.YesNoCancel,
|
||||
];
|
||||
|
||||
public ObservableCollection<DialogMode> DialogModes =>
|
||||
[
|
||||
DialogMode.Info,
|
||||
DialogMode.Warning,
|
||||
DialogMode.Error,
|
||||
DialogMode.Question,
|
||||
DialogMode.None,
|
||||
DialogMode.Success,
|
||||
];
|
||||
|
||||
public DialogDemoViewModel()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
@@ -25,23 +24,6 @@ public partial class DrawerDemoViewModel : ObservableObject
|
||||
[ObservableProperty] private bool _isModal;
|
||||
[ObservableProperty] private DateTime? _date;
|
||||
|
||||
public ObservableCollection<Position> Positions =>
|
||||
[
|
||||
Position.Left,
|
||||
Position.Top,
|
||||
Position.Right,
|
||||
Position.Bottom,
|
||||
];
|
||||
|
||||
public ObservableCollection<DialogButton> DialogButtons =>
|
||||
[
|
||||
DialogButton.None,
|
||||
DialogButton.OK,
|
||||
DialogButton.OKCancel,
|
||||
DialogButton.YesNo,
|
||||
DialogButton.YesNoCancel,
|
||||
];
|
||||
|
||||
public DrawerDemoViewModel()
|
||||
{
|
||||
ShowDialogCommand = new AsyncRelayCommand(ShowDefaultDialog);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Layout;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
@@ -24,35 +23,6 @@ public partial class ElasticWrapPanelDemoViewModel : ObservableObject
|
||||
[ObservableProperty] private HorizontalAlignment _cmbHAlign = HorizontalAlignment.Left;
|
||||
[ObservableProperty] private VerticalAlignment _cmbVAlign = VerticalAlignment.Stretch;
|
||||
|
||||
public ObservableCollection<Orientation> Orientations =>
|
||||
[
|
||||
Orientation.Horizontal,
|
||||
Orientation.Vertical,
|
||||
];
|
||||
|
||||
public ObservableCollection<ScrollBarVisibility> ScrollBarVisibilities =>
|
||||
[
|
||||
ScrollBarVisibility.Auto,
|
||||
ScrollBarVisibility.Hidden,
|
||||
ScrollBarVisibility.Visible,
|
||||
];
|
||||
|
||||
public ObservableCollection<HorizontalAlignment> HorizontalAlignments =>
|
||||
[
|
||||
HorizontalAlignment.Left,
|
||||
HorizontalAlignment.Center,
|
||||
HorizontalAlignment.Right,
|
||||
HorizontalAlignment.Stretch,
|
||||
];
|
||||
|
||||
public ObservableCollection<VerticalAlignment> VerticalAlignments =>
|
||||
[
|
||||
VerticalAlignment.Top,
|
||||
VerticalAlignment.Center,
|
||||
VerticalAlignment.Bottom,
|
||||
VerticalAlignment.Stretch,
|
||||
];
|
||||
|
||||
private double _oldItemSelfWidth;
|
||||
private double _oldItemSelfHeight;
|
||||
|
||||
|
||||
@@ -1,33 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Avalonia.Layout;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Ursa.Common;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
public partial class FormDemoViewModel : ObservableObject
|
||||
{
|
||||
[ObservableProperty] private DataModel _model;
|
||||
[ObservableProperty] private Position _selectedPosition = Position.Top;
|
||||
[ObservableProperty] private HorizontalAlignment _selectedHorizontalAlignment = HorizontalAlignment.Left;
|
||||
|
||||
public ObservableCollection<Position> Positions =>
|
||||
[
|
||||
Position.Left,
|
||||
Position.Top,
|
||||
Position.Right,
|
||||
Position.Bottom,
|
||||
];
|
||||
|
||||
public ObservableCollection<HorizontalAlignment> HorizontalAlignments =>
|
||||
[
|
||||
HorizontalAlignment.Stretch,
|
||||
HorizontalAlignment.Left,
|
||||
HorizontalAlignment.Center,
|
||||
HorizontalAlignment.Right,
|
||||
];
|
||||
|
||||
public FormDemoViewModel()
|
||||
{
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Ursa.Common;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
public partial class IconButtonDemoViewModel : ObservableObject
|
||||
public class IconButtonDemoViewModel : ObservableObject
|
||||
{
|
||||
[ObservableProperty] private Position _selectedPosition = Position.Top;
|
||||
|
||||
public ObservableCollection<Position> Positions =>
|
||||
[
|
||||
Position.Left,
|
||||
Position.Top,
|
||||
Position.Right,
|
||||
Position.Bottom,
|
||||
];
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows.Input;
|
||||
using Avalonia.Layout;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Ursa.Controls;
|
||||
@@ -9,14 +8,6 @@ namespace Ursa.Demo.ViewModels;
|
||||
|
||||
public partial class ToolBarDemoViewModel : ObservableObject
|
||||
{
|
||||
[ObservableProperty] private Orientation _selectedOrientation;
|
||||
|
||||
public ObservableCollection<Orientation> Orientations =>
|
||||
[
|
||||
Orientation.Horizontal,
|
||||
Orientation.Vertical
|
||||
];
|
||||
|
||||
public ObservableCollection<ToolBarItemViewModel> Items { get; set; }
|
||||
|
||||
public ToolBarDemoViewModel()
|
||||
@@ -76,6 +67,7 @@ public class ToolBarComboBoxItemViewModel : ToolBarItemViewModel
|
||||
public ObservableCollection<string>? Items { get; set; }
|
||||
|
||||
private string? _selectedItem;
|
||||
|
||||
public string? SelectedItem
|
||||
{
|
||||
get => _selectedItem;
|
||||
|
||||
Reference in New Issue
Block a user