Skip to content

Commit da4e6ea

Browse files
Add more animals
Though this sample is still broken with NAOT on WinUI 3... :( Tried a couple of the suggested workarounds, but they did not work on my machine, see #516
1 parent 459bfd6 commit da4e6ea

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

components/Primitives/samples/SwitchPresenter/SwitchPresenterValueSample.xaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
<controls:SwitchPresenter Padding="16"
2424
TargetType="local:Animal"
2525
Value="{Binding SelectedItem, ElementName=AnimalPicker}">
26+
<controls:Case Value="Bunny">
27+
<TextBlock FontSize="32"
28+
Text="🐇" />
29+
</controls:Case>
2630
<controls:Case Value="Cat">
2731
<TextBlock FontSize="32"
2832
Text="🐈" />
@@ -31,14 +35,22 @@
3135
<TextBlock FontSize="32"
3236
Text="🐕" />
3337
</controls:Case>
34-
<controls:Case Value="Bunny">
38+
<controls:Case Value="Giraffe">
3539
<TextBlock FontSize="32"
36-
Text="🐇" />
40+
Text="🦒" />
3741
</controls:Case>
3842
<controls:Case Value="Llama">
3943
<TextBlock FontSize="32"
4044
Text="🦙" />
4145
</controls:Case>
46+
<controls:Case Value="Otter">
47+
<TextBlock FontSize="32"
48+
Text="🦦" />
49+
</controls:Case>
50+
<controls:Case Value="Owl">
51+
<TextBlock FontSize="32"
52+
Text="🦉" />
53+
</controls:Case>
4254
<controls:Case Value="Parrot">
4355
<TextBlock FontSize="32"
4456
Text="🦜" />

components/Primitives/samples/SwitchPresenter/SwitchPresenterValueSample.xaml.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ public SwitchPresenterValueSample()
1515

1616
public enum Animal
1717
{
18+
Bunny,
1819
Cat,
1920
Dog,
20-
Bunny,
21+
Giraffe,
2122
Llama,
23+
Otter,
24+
Owl,
2225
Parrot,
2326
Squirrel
2427
}

0 commit comments

Comments
 (0)