Skip to content

Commit 9035037

Browse files
authored
Forms 5.0 updates. (xamarin#686)
* Use RadioButtonGroup AP. * Add FlyoutContent example.
1 parent ac9f80e commit 9035037

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

UserInterface/RadioButtonDemos/RadioButtonDemos/GroupedRadioButtonsPageCode.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public GroupedRadioButtonsPageCode()
3535
Children = { appleRadioButton, bananaRadioButton, pineappleRadioButton, otherFruitRadioButton }
3636
};
3737

38-
// All of the RadioButtons in this StackLayout will automatically be given the GroupName 'fruits`.
39-
fruitStackLayout.SetValue(RadioButtonGroup.GroupNameProperty, "fruits");
38+
// All of the RadioButtons in this StackLayout will automatically be given the GroupName 'fruits'.
39+
RadioButtonGroup.SetGroupName(fruitStackLayout, "fruits");
4040

4141
Title = "Grouped RadioButtons demo (code)";
4242
Content = new StackLayout

UserInterface/Xaminals/Xaminals/AppShell.xaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
xmlns:sys="clr-namespace:System;assembly=netstandard"
66
xmlns:views="clr-namespace:Xaminals.Views"
77
x:Class="Xaminals.AppShell"
8+
x:Name="shell"
89
FlyoutBackgroundImage="photo.jpg"
910
FlyoutBackgroundImageAspect="AspectFill"
1011
FlyoutHeaderBehavior="CollapseOnScroll">
@@ -98,6 +99,40 @@
9899
</DataTemplate>
99100
</Shell.FlyoutFooterTemplate>-->
100101

102+
<!-- FlyoutContent -->
103+
<!-- Not required, just an example -->
104+
<!--<Shell.FlyoutContent>
105+
<CollectionView BindingContext="{x:Reference shell}"
106+
IsGrouped="True"
107+
ItemsSource="{Binding FlyoutItems}">
108+
<CollectionView.ItemTemplate>
109+
<DataTemplate>
110+
<Label Text="{Binding Title}"
111+
TextColor="White"
112+
FontSize="Large" />
113+
</DataTemplate>
114+
</CollectionView.ItemTemplate>
115+
</CollectionView>
116+
</Shell.FlyoutContent>-->
117+
118+
<!-- Template for FlyoutContent -->
119+
<!-- Not required, just an example -->
120+
<!--<Shell.FlyoutContentTemplate>
121+
<DataTemplate>
122+
<CollectionView BindingContext="{x:Reference shell}"
123+
IsGrouped="True"
124+
ItemsSource="{Binding FlyoutItems}">
125+
<CollectionView.ItemTemplate>
126+
<DataTemplate>
127+
<Label Text="{Binding Title}"
128+
TextColor="White"
129+
FontSize="Large" />
130+
</DataTemplate>
131+
</CollectionView.ItemTemplate>
132+
</CollectionView>
133+
</DataTemplate>
134+
</Shell.FlyoutContentTemplate>-->
135+
101136
<!-- Template each FlyoutItem -->
102137
<!-- <Shell.ItemTemplate>
103138
<DataTemplate>

0 commit comments

Comments
 (0)