Merge pull request '💄 minor changes in the custom toolbar sample' (#4) from customToolbar into master

Reviewed-on: #4
pull/5/head
Marc CHEVALDONNE 7 months ago
commit d664fe034f

@ -10,34 +10,6 @@
Shell.BackgroundColor="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource PrimaryDark}}"
Title="ex_CustomToolbar">
<!-- <Shell.TitleView>
<Grid ColumnDefinitions="Auto, *, Auto, Auto, Auto" HorizontalOptions="Fill">
<Image Source="vinyl.png" HeightRequest="36"/>
<Label Grid.Column="1" Margin="10, 0, 0, 0"
Text="My Music App"
TextColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}"
VerticalTextAlignment="Center"
VerticalOptions="Center"
HeightRequest="36"
FontSize="Medium"/>
<ImageButton Source="hare.png" Grid.Column="2" MaximumHeightRequest="24">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
</ImageButton.Behaviors>
</ImageButton>
<ImageButton Source="info_circle.png" Grid.Column="3" MaximumHeightRequest="24">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
</ImageButton.Behaviors>
</ImageButton>
<ImageButton Source="ellipsis_vert.png" Grid.Column="4" MaximumHeightRequest="24">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
</ImageButton.Behaviors>
</ImageButton>
</Grid>
</Shell.TitleView> -->
<ShellContent
Title="Home"
ContentTemplate="{DataTemplate local:MainPage}"

@ -20,19 +20,19 @@
VerticalOptions="Center"
HeightRequest="36"
FontSize="Medium"/>
<ImageButton Source="hare.png" Grid.Column="2" MaximumHeightRequest="24" MinimumHeightRequest="{OnPlatform WinUI=24}"
<ImageButton Source="hare.png" Grid.Column="2" MaximumHeightRequest="24" MinimumHeightRequest="24"
BackgroundColor="Transparent">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
</ImageButton.Behaviors>
</ImageButton>
<ImageButton Source="info_circle.png" Grid.Column="3" MaximumHeightRequest="24" MinimumHeightRequest="{OnPlatform WinUI=24}"
<ImageButton Source="info_circle.png" Grid.Column="3" MaximumHeightRequest="24" MinimumHeightRequest="24"
BackgroundColor="Transparent">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
</ImageButton.Behaviors>
</ImageButton>
<ImageButton Source="ellipsis_vert.png" Grid.Column="4" MaximumHeightRequest="24" MinimumHeightRequest="{OnPlatform WinUI=24}" Clicked="EllipsisClicked"
<ImageButton Source="ellipsis_vert.png" Grid.Column="4" MaximumHeightRequest="24" MinimumHeightRequest="24" Clicked="EllipsisClicked"
BackgroundColor="Transparent">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
@ -74,7 +74,7 @@
</ScrollView>
<AbsoluteLayout AbsoluteLayout.LayoutFlags="All"
AbsoluteLayout.LayoutBounds="0, 0, 1, 1"
x:Name="test"
x:Name="secondaryMenu"
IsVisible="false">
<AbsoluteLayout.GestureRecognizers>
<TapGestureRecognizer Tapped="BackgroundClicked"/>

@ -23,15 +23,12 @@ public partial class MainPage : ContentPage
private void EllipsisClicked(object sender, EventArgs e)
{
test.IsVisible = !test.IsVisible;
secondaryMenu.IsVisible = !secondaryMenu.IsVisible;
}
private void BackgroundClicked(object sender, TappedEventArgs e)
{
if(test.IsVisible)
{
test.IsVisible = false;
}
secondaryMenu.IsVisible = false;
}
}

Loading…
Cancel
Save