Revert "feat: remove EnumSelector in demo."

This reverts commit f7dc4d35
This commit is contained in:
Zhang Dian
2024-08-05 23:40:23 +08:00
parent fb7a51d1d2
commit b69502886f
12 changed files with 41 additions and 151 deletions

View File

@@ -2,11 +2,10 @@
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">
@@ -15,16 +14,14 @@
</UserControl.Resources>
<StackPanel HorizontalAlignment="Left" Spacing="16">
<ToggleSwitch Name="loading" Content="Toggle Loading" />
<ComboBox Name="placement"
ItemsSource="{Binding Positions}"
SelectedValue="{Binding SelectedPosition}" />
<u:EnumSelector Name="placement" EnumType="{x:Type common:Position}" />
<u:IconButton
Content="Hello World"
IconPlacement="{Binding #placement.SelectedValue}"
IconPlacement="{Binding #placement.Value}"
IsLoading="{Binding #loading.IsChecked}" />
<u:IconButton
Content="Hello Panda"
IconPlacement="{Binding #placement.SelectedValue}"
IconPlacement="{Binding #placement.Value}"
IsLoading="{Binding #loading.IsChecked}">
<u:IconButton.Icon>
<TextBlock
@@ -35,7 +32,7 @@
</u:IconButton>
<u:IconButton
Content="GitHub"
IconPlacement="{Binding #placement.SelectedValue}"
IconPlacement="{Binding #placement.Value}"
IsLoading="{Binding #loading.IsChecked}">
<u:IconButton.Icon>
<PathIcon
@@ -47,7 +44,7 @@
<u:IconButton
Width="150"
Content="GitHub"
IconPlacement="{Binding #placement.SelectedValue}"
IconPlacement="{Binding #placement.Value}"
IsLoading="{Binding #loading.IsChecked}">
<u:IconButton.Icon>
<PathIcon
@@ -60,7 +57,7 @@
Width="150"
Classes="Warning"
Content="GitHub"
IconPlacement="{Binding #placement.SelectedValue}"
IconPlacement="{Binding #placement.Value}"
IsLoading="{Binding #loading.IsChecked}">
<u:IconButton.Icon>
<PathIcon
@@ -72,7 +69,7 @@
<u:IconButton
Width="150"
Content="GitHub"
IconPlacement="{Binding #placement.SelectedValue}"
IconPlacement="{Binding #placement.Value}"
IsLoading="{Binding #loading.IsChecked}"
Theme="{DynamicResource SolidIconButton}">
<u:IconButton.Icon>
@@ -86,7 +83,7 @@
Width="150"
Classes="Warning"
Content="GitHub"
IconPlacement="{Binding #placement.SelectedValue}"
IconPlacement="{Binding #placement.Value}"
IsLoading="{Binding #loading.IsChecked}"
Theme="{DynamicResource SolidIconButton}">
<u:IconButton.Icon>