feat: update demo.
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</UserControl.Styles>
|
</UserControl.Styles>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<u:RangeSlider Name="range" Height="24"/>
|
<u:RangeSlider Name="range" Height="24" TickFrequency="5" IsSnapToTick="True"/>
|
||||||
<u:NumericDoubleUpDown InnerLeftContent="Minimum" Value="{Binding #range.Minimum, Mode=TwoWay}" />
|
<u:NumericDoubleUpDown InnerLeftContent="Minimum" Value="{Binding #range.Minimum, Mode=TwoWay}" />
|
||||||
<u:NumericDoubleUpDown InnerLeftContent="Maximum" Value="{Binding #range.Maximum, Mode=TwoWay}" />
|
<u:NumericDoubleUpDown InnerLeftContent="Maximum" Value="{Binding #range.Maximum, Mode=TwoWay}" />
|
||||||
<u:NumericDoubleUpDown InnerLeftContent="LowerValue" Value="{Binding #range.LowerValue, Mode=TwoWay}" />
|
<u:NumericDoubleUpDown InnerLeftContent="LowerValue" Value="{Binding #range.LowerValue, Mode=TwoWay}" />
|
||||||
|
|||||||
@@ -5,11 +5,19 @@ using CommunityToolkit.Mvvm.Messaging;
|
|||||||
|
|
||||||
namespace Ursa.Demo.ViewModels;
|
namespace Ursa.Demo.ViewModels;
|
||||||
|
|
||||||
|
public enum ControlStatus
|
||||||
|
{
|
||||||
|
New,
|
||||||
|
Beta,
|
||||||
|
Stable,
|
||||||
|
}
|
||||||
|
|
||||||
public class MenuItemViewModel: ViewModelBase
|
public class MenuItemViewModel: ViewModelBase
|
||||||
{
|
{
|
||||||
public string MenuHeader { get; set; }
|
public string MenuHeader { get; set; }
|
||||||
public string MenuIconName { get; set; }
|
public string MenuIconName { get; set; }
|
||||||
public string Key { get; set; }
|
public string Key { get; set; }
|
||||||
|
public string Status { get; set; }
|
||||||
|
|
||||||
public bool IsSeparator { get; set; }
|
public bool IsSeparator { get; set; }
|
||||||
public ObservableCollection<MenuItemViewModel> Children { get; set; } = new();
|
public ObservableCollection<MenuItemViewModel> Children { get; set; } = new();
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public class MenuViewModel: ViewModelBase
|
|||||||
new() { MenuHeader = "Navigation", Key = MenuKeys.MenuKeyNavigation },
|
new() { MenuHeader = "Navigation", Key = MenuKeys.MenuKeyNavigation },
|
||||||
new() { MenuHeader = "NumericUpDown", Key = MenuKeys.MenuKeyNumericUpDown },
|
new() { MenuHeader = "NumericUpDown", Key = MenuKeys.MenuKeyNumericUpDown },
|
||||||
new() { MenuHeader = "Pagination", Key = MenuKeys.MenuKeyPagination },
|
new() { MenuHeader = "Pagination", Key = MenuKeys.MenuKeyPagination },
|
||||||
new() { MenuHeader = "RangeSlider", Key = MenuKeys.MenuKeyRangeSlider },
|
new() { MenuHeader = "RangeSlider", Key = MenuKeys.MenuKeyRangeSlider, Status = "WIP"},
|
||||||
new() { MenuHeader = "TagInput", Key = MenuKeys.MenuKeyTagInput },
|
new() { MenuHeader = "TagInput", Key = MenuKeys.MenuKeyTagInput },
|
||||||
new() { MenuHeader = "Timeline", Key = MenuKeys.MenuKeyTimeline },
|
new() { MenuHeader = "Timeline", Key = MenuKeys.MenuKeyTimeline },
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,8 +43,15 @@
|
|||||||
<DataTemplate DataType="vm:MenuItemViewModel">
|
<DataTemplate DataType="vm:MenuItemViewModel">
|
||||||
<u:NavigationMenuItem
|
<u:NavigationMenuItem
|
||||||
Command="{Binding ActivateCommand}"
|
Command="{Binding ActivateCommand}"
|
||||||
Header="{Binding MenuHeader}"
|
Header="{Binding }"
|
||||||
ItemsSource="{Binding Children}">
|
ItemsSource="{Binding Children}">
|
||||||
|
<u:NavigationMenuItem.HeaderTemplate>
|
||||||
|
<DataTemplate x:DataType="vm:MenuItemViewModel">
|
||||||
|
<u:Badge BadgeContent="{Binding Status}" CornerPosition="TopRight" HorizontalAlignment="Left">
|
||||||
|
<TextBlock Text="{Binding MenuHeader}" HorizontalAlignment="Left"></TextBlock>
|
||||||
|
</u:Badge>
|
||||||
|
</DataTemplate>
|
||||||
|
</u:NavigationMenuItem.HeaderTemplate>
|
||||||
<u:NavigationMenuItem.Icon>
|
<u:NavigationMenuItem.Icon>
|
||||||
<Border
|
<Border
|
||||||
Width="10"
|
Width="10"
|
||||||
|
|||||||
Reference in New Issue
Block a user