Last active
July 17, 2019 14:40
-
-
Save TheBaileyBrew/55e7941b56c81f42ea08aecec13a72eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Style x:Key="FlyoutHeaderStyle" TargetType="Label"> | |
<Setter Property="FontSize" Value="Default" /> | |
<Setter Property="Margin" Value="15,0" /> | |
<Setter Property="TextColor" Value="Black" /> | |
<Setter Property="FontAttributes" Value="Bold" /> | |
<Setter Property="HorizontalOptions" Value="Start" /> | |
</Style> | |
<Style x:Key="FlyoutItemStyle" TargetType="Label"> | |
<Setter Property="FontSize" Value="Default" /> | |
<Setter Property="Margin" Value="15,1" /> | |
<Setter Property="TextColor" Value="Red" /> | |
<Setter Property="HorizontalOptions" Value="Start" /> | |
</Style> | |
<Style x:Key="FlyoutMenuStyle" TargetType="Label"> | |
<Setter Property="FontSize" Value="Default" /> | |
<Setter Property="TextColor" Value="Gray" /> | |
<Setter Property="FontAttributes" Value="Italic" /> | |
<Setter Property="Margin" Value="15,0" /> | |
<Setter Property="HorizontalOptions" Value="Start" /> | |
</Style> | |
<DataTemplate x:Key="FlyoutItemTemplate"> | |
<StackLayout Orientation="Horizontal"> | |
<BoxView BackgroundColor="{Binding FlyoutColor}" Margin="5,0,5,0" WidthRequest="4" VerticalOptions="CenterAndExpand" /> | |
<Label | |
FontFamily="{StaticResource MaterialFontFamily}" | |
Text="{StaticResource {Binding ItemReferenceImage}}" | |
Margin="0,0,10,0"/> | |
<Label | |
Style="{StaticResource FlyoutItemStyle}" | |
Text="{Binding Title}" | |
TextColor="Black" | |
VerticalOptions="Center" /> | |
</StackLayout> | |
</DataTemplate> | |
<DataTemplate x:Key="FlyoutHeaderTemplate"> | |
<StackLayout Orientation="Horizontal" Margin="5,0,5,0"> | |
<BoxView BackgroundColor="{Binding FlyoutColor}" WidthRequest="4" VerticalOptions="CenterAndExpand" /> | |
<StackLayout Orientation="Vertical"> | |
<Label | |
Style="{StaticResource FlyoutHeaderStyle}" | |
Text="{Binding Title}" | |
TextColor="Black" | |
VerticalOptions="Center" /> | |
<BoxView | |
Margin="15,2,25,0" | |
BackgroundColor="{StaticResource HackneyRed}" | |
HeightRequest="1" | |
HorizontalOptions="FillAndExpand"/> | |
</StackLayout> | |
</StackLayout> | |
</DataTemplate> | |
<controls:NavigationFlyoutItemTemplateSelector | |
x:Key="FlyoutTemplateSelector" | |
NavigationHeaderTemplate="{StaticResource FlyoutHeaderTemplate}" | |
NavigationItemTemplate="{StaticResource FlyoutItemTemplate}" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment