Expander of flyout items in .net maui
Haider Ali Faizi
80
Reputation points
I want to add expander in flyout items. There is also answer available and that is:"https://learn.microsoft.com/en-us/answers/questions/315590/is-it-possible-to-use-expander-in-shell-flyout" but it is adding in header. I want to add in flyout items. I found one solution and that is:"https://github.com/xamarin/XamarinCommunityToolkit/issues/570"It is working fine somehow but how i move to expanded page like if I have that code:" <Shell.ItemTemplate>
<DataTemplate>
<StackLayout>
<!--This grid is a workaround to make the expanding menu work on iOS.
If and when the bug is fixed, it can be done away with and the stack layout can be moved back to the Expander.Header-->
<Grid RowDefinitions="35">
<StackLayout
Orientation="Horizontal">
**THE UI PREVIOUSLY IN THE EXPANDER.HEADER, LABEL / CHEVRON ETC**
</StackLayout>
<Button BackgroundColor="Transparent" Clicked="Button_OnClicked"></Button>
</Grid>
<toolkit:Expander x:Name="Expander">
<!--<toolkit:Expander.Header>
**Where the header ui should go in an ideal circumstance, if iOS wasn't being weird.**
</toolkit:Expander.Header>-->
<StackLayout Margin="60,0,0,0">
**... menu items, to be displayed when expanded**
</StackLayout>
</toolkit:Expander>
</StackLayout>
</DataTemplate>
</Shell.ItemTemplate>
" If, I write label in menu items because due to expander, I cannot write shellcontent etc for routes. How can I move to that expanded page