feat: remove EnumSelector in demo.
This commit is contained in:
@@ -52,11 +52,11 @@
|
||||
OnContent="Yes" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center" Text="Buttons" />
|
||||
<u:EnumSelector EnumType="{x:Type u:DialogButton}" Value="{Binding SelectedButton}" />
|
||||
<ComboBox ItemsSource="{Binding DialogButtons}" SelectedValue="{Binding SelectedButton}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center" Text="Mode" />
|
||||
<u:EnumSelector EnumType="{x:Type u:DialogMode}" Value="{Binding SelectedMode}" />
|
||||
<ComboBox ItemsSource="{Binding DialogModes}" SelectedValue="{Binding SelectedMode}" />
|
||||
</StackPanel>
|
||||
<Button Command="{Binding ShowDialogCommand}" Content="Show Dialog" />
|
||||
<TextBlock>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<TabControl Grid.Column="0" Width="300">
|
||||
<TabItem Header="Default">
|
||||
<StackPanel>
|
||||
<u:EnumSelector EnumType="common:Position" Value="{Binding SelectedPosition}" />
|
||||
<ComboBox ItemsSource="{Binding Positions}" SelectedValue="{Binding SelectedPosition}" />
|
||||
<ToggleSwitch
|
||||
Content="Global/Local"
|
||||
IsChecked="{Binding IsGlobal}"
|
||||
@@ -34,7 +34,7 @@
|
||||
OnContent="Yes" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Buttons" />
|
||||
<u:EnumSelector EnumType="{x:Type u:DialogButton}" Value="{Binding SelectedButton}" />
|
||||
<ComboBox ItemsSource="{Binding DialogButtons}" SelectedValue="{Binding SelectedButton}" />
|
||||
</StackPanel>
|
||||
<Button Command="{Binding ShowDialogCommand}" Content="Show Default Drawer" />
|
||||
<TextBlock>
|
||||
@@ -49,7 +49,7 @@
|
||||
</TabItem>
|
||||
<TabItem Header="Custom">
|
||||
<StackPanel>
|
||||
<u:EnumSelector EnumType="common:Position" Value="{Binding SelectedPosition}" />
|
||||
<ComboBox ItemsSource="{Binding Positions}" SelectedValue="{Binding SelectedPosition}" />
|
||||
<ToggleSwitch
|
||||
Content="Global/Local"
|
||||
IsChecked="{Binding IsGlobal}"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<Setter Property="Width" Value="{Binding ItemSelfWidth}" />
|
||||
<Setter Property="Height" Value="{Binding ItemSelfHeight}" />
|
||||
</Style>
|
||||
<Style Selector="u|EnumSelector">
|
||||
<Style Selector="ComboBox">
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
@@ -30,13 +30,13 @@
|
||||
Margin="4 0">
|
||||
<u:FormGroup>
|
||||
<u:FormItem Label="Orientation">
|
||||
<u:EnumSelector EnumType="Orientation" Value="{Binding SelectedOrientation}" />
|
||||
<ComboBox ItemsSource="{Binding Orientations}" SelectedValue="{Binding SelectedOrientation}"/>
|
||||
</u:FormItem>
|
||||
<u:FormItem Label="HorizontalScrollBar">
|
||||
<u:EnumSelector EnumType="ScrollBarVisibility" Value="{Binding HorizontalVisibility}" />
|
||||
<ComboBox ItemsSource="{Binding ScrollBarVisibilities}" SelectedValue="{Binding HorizontalVisibility}"/>
|
||||
</u:FormItem>
|
||||
<u:FormItem Label="VerticalScrollBar">
|
||||
<u:EnumSelector EnumType="ScrollBarVisibility" Value="{Binding VerticalVisibility}" />
|
||||
<ComboBox ItemsSource="{Binding ScrollBarVisibilities}" SelectedValue="{Binding VerticalVisibility}"/>
|
||||
</u:FormItem>
|
||||
<u:FormItem>
|
||||
<u:FormItem.Label>
|
||||
@@ -93,10 +93,10 @@
|
||||
Value="{Binding ItemSelfHeight}" />
|
||||
</u:FormItem>
|
||||
<u:FormItem Label="HorizontalAlignment">
|
||||
<u:EnumSelector EnumType="HorizontalAlignment" Value="{Binding CmbHAlign}" />
|
||||
<ComboBox ItemsSource="{Binding HorizontalAlignments}" SelectedValue="{Binding CmbHAlign}"/>
|
||||
</u:FormItem>
|
||||
<u:FormItem Label="VerticalAlignment">
|
||||
<u:EnumSelector EnumType="VerticalAlignment" Value="{Binding CmbVAlign}" />
|
||||
<ComboBox ItemsSource="{Binding VerticalAlignments}" SelectedValue="{Binding CmbVAlign}"/>
|
||||
</u:FormItem>
|
||||
</u:FormGroup>
|
||||
</u:Form>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
x:Class="Ursa.Demo.Pages.FormDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:common="clr-namespace:Ursa.Common;assembly=Ursa"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
@@ -15,21 +14,21 @@
|
||||
<ScrollViewer>
|
||||
<StackPanel>
|
||||
<Grid RowDefinitions="Auto, Auto" ColumnDefinitions="Auto, Auto">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Label Position" VerticalAlignment="Center"></TextBlock>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Label Alignment" VerticalAlignment="Center"></TextBlock>
|
||||
<u:EnumSelector Grid.Row="0" Grid.Column="1"
|
||||
Name="position"
|
||||
EnumType="common:Position"
|
||||
Value="{x:Static common:Position.Top}" />
|
||||
<u:EnumSelector Grid.Row="1" Grid.Column="1"
|
||||
Name="alignment"
|
||||
EnumType="HorizontalAlignment"
|
||||
Value="{x:Static HorizontalAlignment.Left}" />
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Label Position" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Label Alignment" VerticalAlignment="Center" />
|
||||
<ComboBox Grid.Row="0" Grid.Column="1"
|
||||
Name="position"
|
||||
ItemsSource="{Binding Positions}"
|
||||
SelectedValue="{Binding SelectedPosition}" />
|
||||
<ComboBox Grid.Row="1" Grid.Column="1"
|
||||
Name="alignment"
|
||||
ItemsSource="{Binding HorizontalAlignments}"
|
||||
SelectedValue="{Binding SelectedHorizontalAlignment}" />
|
||||
</Grid>
|
||||
<u:Form
|
||||
DataContext="{Binding Model}"
|
||||
LabelAlignment="{Binding #alignment.Value}"
|
||||
LabelPosition="{Binding #position.Value}"
|
||||
LabelAlignment="{Binding #alignment.SelectedValue}"
|
||||
LabelPosition="{Binding #position.SelectedValue}"
|
||||
LabelWidth="*">
|
||||
<u:FormGroup Header="Information">
|
||||
<TextBox
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
x:Class="Ursa.Demo.Pages.IconButtonDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:common="clr-namespace:Ursa.Common;assembly=Ursa"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
xmlns:vm="clr-namespace:Ursa.Demo.ViewModels"
|
||||
x:DataType="vm:IconButtonDemoViewModel"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
@@ -14,14 +15,16 @@
|
||||
</UserControl.Resources>
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="16">
|
||||
<ToggleSwitch Name="loading" Content="Toggle Loading" />
|
||||
<u:EnumSelector Name="placement" EnumType="{x:Type common:Position}" />
|
||||
<ComboBox Name="placement"
|
||||
ItemsSource="{Binding Positions}"
|
||||
SelectedValue="{Binding SelectedPosition}" />
|
||||
<u:IconButton
|
||||
Content="Hello World"
|
||||
IconPlacement="{Binding #placement.Value}"
|
||||
IconPlacement="{Binding #placement.SelectedValue}"
|
||||
IsLoading="{Binding #loading.IsChecked}" />
|
||||
<u:IconButton
|
||||
Content="Hello Panda"
|
||||
IconPlacement="{Binding #placement.Value}"
|
||||
IconPlacement="{Binding #placement.SelectedValue}"
|
||||
IsLoading="{Binding #loading.IsChecked}">
|
||||
<u:IconButton.Icon>
|
||||
<TextBlock
|
||||
@@ -32,7 +35,7 @@
|
||||
</u:IconButton>
|
||||
<u:IconButton
|
||||
Content="GitHub"
|
||||
IconPlacement="{Binding #placement.Value}"
|
||||
IconPlacement="{Binding #placement.SelectedValue}"
|
||||
IsLoading="{Binding #loading.IsChecked}">
|
||||
<u:IconButton.Icon>
|
||||
<PathIcon
|
||||
@@ -44,7 +47,7 @@
|
||||
<u:IconButton
|
||||
Width="150"
|
||||
Content="GitHub"
|
||||
IconPlacement="{Binding #placement.Value}"
|
||||
IconPlacement="{Binding #placement.SelectedValue}"
|
||||
IsLoading="{Binding #loading.IsChecked}">
|
||||
<u:IconButton.Icon>
|
||||
<PathIcon
|
||||
@@ -57,7 +60,7 @@
|
||||
Width="150"
|
||||
Classes="Warning"
|
||||
Content="GitHub"
|
||||
IconPlacement="{Binding #placement.Value}"
|
||||
IconPlacement="{Binding #placement.SelectedValue}"
|
||||
IsLoading="{Binding #loading.IsChecked}">
|
||||
<u:IconButton.Icon>
|
||||
<PathIcon
|
||||
@@ -69,7 +72,7 @@
|
||||
<u:IconButton
|
||||
Width="150"
|
||||
Content="GitHub"
|
||||
IconPlacement="{Binding #placement.Value}"
|
||||
IconPlacement="{Binding #placement.SelectedValue}"
|
||||
IsLoading="{Binding #loading.IsChecked}"
|
||||
Theme="{DynamicResource SolidIconButton}">
|
||||
<u:IconButton.Icon>
|
||||
@@ -83,7 +86,7 @@
|
||||
Width="150"
|
||||
Classes="Warning"
|
||||
Content="GitHub"
|
||||
IconPlacement="{Binding #placement.Value}"
|
||||
IconPlacement="{Binding #placement.SelectedValue}"
|
||||
IsLoading="{Binding #loading.IsChecked}"
|
||||
Theme="{DynamicResource SolidIconButton}">
|
||||
<u:IconButton.Icon>
|
||||
|
||||
@@ -19,11 +19,13 @@
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid ColumnDefinitions="Auto, Auto, *" RowDefinitions="Auto, Auto, *">
|
||||
<u:EnumSelector Name="Orientation" EnumType="Orientation" />
|
||||
<ComboBox Name="Orientation"
|
||||
ItemsSource="{Binding Orientations}"
|
||||
SelectedValue="{Binding SelectedOrientation}"/>
|
||||
<u:ToolBar
|
||||
DockPanel.Dock="Top"
|
||||
Header="Hello World"
|
||||
Orientation="{Binding #Orientation.Value}">
|
||||
Orientation="{Binding #Orientation.SelectedValue}">
|
||||
<Button u:ToolBar.OverflowMode="Never" Content="Button 1" />
|
||||
<u:ToolBarSeparator />
|
||||
<TextBox Width="100" VerticalAlignment="Center"></TextBox>
|
||||
@@ -52,7 +54,7 @@
|
||||
<u:ToolBar
|
||||
DockPanel.Dock="Top"
|
||||
ItemsSource="{Binding Items}"
|
||||
Orientation="{Binding #Orientation.Value}">
|
||||
Orientation="{Binding #Orientation.SelectedValue}">
|
||||
<u:ToolBar.ItemTemplate>
|
||||
<template:ToolBarItemTemplateSelector />
|
||||
</u:ToolBar.ItemTemplate>
|
||||
|
||||
@@ -27,6 +27,25 @@ 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()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@ using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using Avalonia.Controls;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Ursa.Common;
|
||||
@@ -12,7 +11,7 @@ using Ursa.Demo.Dialogs;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
public partial class DrawerDemoViewModel: ObservableObject
|
||||
public partial class DrawerDemoViewModel : ObservableObject
|
||||
{
|
||||
public ICommand ShowDialogCommand { get; set; }
|
||||
public ICommand ShowCustomDialogCommand { get; set; }
|
||||
@@ -25,8 +24,24 @@ public partial class DrawerDemoViewModel: ObservableObject
|
||||
[ObservableProperty] private bool _result;
|
||||
[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);
|
||||
@@ -35,7 +50,7 @@ public partial class DrawerDemoViewModel: ObservableObject
|
||||
IsGlobal = true;
|
||||
IsModal = true;
|
||||
}
|
||||
|
||||
|
||||
private async Task ShowDefaultDialog()
|
||||
{
|
||||
var vm = new PlainDialogViewModel();
|
||||
@@ -67,7 +82,7 @@ public partial class DrawerDemoViewModel: ObservableObject
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private async Task ShowCustomDrawer()
|
||||
{
|
||||
var vm = new DialogWithActionViewModel();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Avalonia.Controls.Primitives;
|
||||
using System.Collections.ObjectModel;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Layout;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
@@ -23,6 +24,35 @@ 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,12 +1,33 @@
|
||||
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
|
||||
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()
|
||||
{
|
||||
@@ -21,28 +42,30 @@ public partial class DataModel : ObservableObject
|
||||
[MinLength(10)]
|
||||
public string Name
|
||||
{
|
||||
get=>_name;
|
||||
get => _name;
|
||||
set => SetProperty(ref _name, value);
|
||||
}
|
||||
|
||||
private double _number;
|
||||
|
||||
[Range(0.0, 10.0)]
|
||||
public double Number
|
||||
{
|
||||
get => _number;
|
||||
set => SetProperty(ref _number, value);
|
||||
}
|
||||
|
||||
|
||||
private string _email;
|
||||
|
||||
|
||||
[EmailAddress]
|
||||
public string Email
|
||||
{
|
||||
get=>_email;
|
||||
get => _email;
|
||||
set => SetProperty(ref _email, value);
|
||||
}
|
||||
|
||||
private DateTime _date;
|
||||
|
||||
public DateTime Date
|
||||
{
|
||||
get => _date;
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System.Collections.ObjectModel;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Ursa.Common;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
public class IconButtonDemoViewModel: ObservableObject
|
||||
public partial class IconButtonDemoViewModel : ObservableObject
|
||||
{
|
||||
|
||||
[ObservableProperty] private Position _selectedPosition = Position.Top;
|
||||
|
||||
public ObservableCollection<Position> Positions =>
|
||||
[
|
||||
Position.Left,
|
||||
Position.Top,
|
||||
Position.Right,
|
||||
Position.Bottom,
|
||||
];
|
||||
}
|
||||
@@ -1,19 +1,29 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows.Input;
|
||||
using Avalonia.Layout;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Ursa.Controls;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
public partial class ToolBarDemoViewModel: ObservableObject
|
||||
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()
|
||||
{
|
||||
Items = new()
|
||||
{
|
||||
new ToolBarButtonItemViewModel() { Content = "New", OverflowMode = OverflowMode.AsNeeded},
|
||||
new ToolBarButtonItemViewModel() { Content = "New", OverflowMode = OverflowMode.AsNeeded },
|
||||
new ToolBarButtonItemViewModel() { Content = "Open" },
|
||||
new ToolBarButtonItemViewModel() { Content = "Save1" },
|
||||
new ToolBarButtonItemViewModel() { Content = "Save2" },
|
||||
@@ -26,18 +36,18 @@ public partial class ToolBarDemoViewModel: ObservableObject
|
||||
new ToolBarSeparatorViewModel(),
|
||||
new ToolBarButtonItemViewModel() { Content = "Save8" },
|
||||
new ToolBarCheckBoxItemViweModel() { Content = "Bold" },
|
||||
new ToolBarCheckBoxItemViweModel() { Content = "Italic", OverflowMode = OverflowMode.Never},
|
||||
new ToolBarComboBoxItemViewModel() { Content = "Font Size", Items = new (){ "10", "12", "14" } }
|
||||
new ToolBarCheckBoxItemViweModel() { Content = "Italic", OverflowMode = OverflowMode.Never },
|
||||
new ToolBarComboBoxItemViewModel() { Content = "Font Size", Items = new() { "10", "12", "14" } }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class ToolBarItemViewModel: ObservableObject
|
||||
public abstract class ToolBarItemViewModel : ObservableObject
|
||||
{
|
||||
public OverflowMode OverflowMode { get; set; }
|
||||
}
|
||||
|
||||
public class ToolBarButtonItemViewModel: ToolBarItemViewModel
|
||||
public class ToolBarButtonItemViewModel : ToolBarItemViewModel
|
||||
{
|
||||
public string Content { get; set; }
|
||||
public ICommand Command { get; set; }
|
||||
@@ -48,7 +58,7 @@ public class ToolBarButtonItemViewModel: ToolBarItemViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public class ToolBarCheckBoxItemViweModel: ToolBarItemViewModel
|
||||
public class ToolBarCheckBoxItemViweModel : ToolBarItemViewModel
|
||||
{
|
||||
public string Content { get; set; }
|
||||
public bool IsChecked { get; set; }
|
||||
@@ -60,12 +70,13 @@ public class ToolBarCheckBoxItemViweModel: ToolBarItemViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public class ToolBarComboBoxItemViewModel: ToolBarItemViewModel
|
||||
public class ToolBarComboBoxItemViewModel : ToolBarItemViewModel
|
||||
{
|
||||
public string Content { get; set; }
|
||||
public ObservableCollection<string> Items { get; set; }
|
||||
|
||||
private string _selectedItem;
|
||||
|
||||
public string SelectedItem
|
||||
{
|
||||
get => _selectedItem;
|
||||
@@ -77,7 +88,6 @@ public class ToolBarComboBoxItemViewModel: ToolBarItemViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public class ToolBarSeparatorViewModel: ToolBarItemViewModel
|
||||
public class ToolBarSeparatorViewModel : ToolBarItemViewModel
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user