From b03c5afcf5d1dc78ce65e996b6cbf24c7afa69e4 Mon Sep 17 00:00:00 2001 From: marcchevaldonne Date: Sat, 27 Apr 2024 02:33:57 +0200 Subject: [PATCH] :lipstick: minor changes in the custom toolbar sample --- .../ex_CustomToolbar/AppShell.xaml | 28 ------------------- .../ex_CustomToolbar/MainPage.xaml | 8 +++--- .../ex_CustomToolbar/MainPage.xaml.cs | 7 ++--- 3 files changed, 6 insertions(+), 37 deletions(-) diff --git a/ch02_DesigningViews/ex_CustomToolbar/AppShell.xaml b/ch02_DesigningViews/ex_CustomToolbar/AppShell.xaml index 1cfb84a..811451f 100644 --- a/ch02_DesigningViews/ex_CustomToolbar/AppShell.xaml +++ b/ch02_DesigningViews/ex_CustomToolbar/AppShell.xaml @@ -10,34 +10,6 @@ Shell.BackgroundColor="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource PrimaryDark}}" Title="ex_CustomToolbar"> - - - - - @@ -74,7 +74,7 @@ diff --git a/ch02_DesigningViews/ex_CustomToolbar/MainPage.xaml.cs b/ch02_DesigningViews/ex_CustomToolbar/MainPage.xaml.cs index 1e57fe2..a395dad 100644 --- a/ch02_DesigningViews/ex_CustomToolbar/MainPage.xaml.cs +++ b/ch02_DesigningViews/ex_CustomToolbar/MainPage.xaml.cs @@ -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; } }