From 817aa39a980223f2c5f7d59f405332f15c43fc16 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Fri, 7 Oct 2016 23:13:34 +0200 Subject: [PATCH] binds a toolbar item to its command --- BookAStar/BookAStar/App.xaml.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BookAStar/BookAStar/App.xaml.cs b/BookAStar/BookAStar/App.xaml.cs index 5e20e7f3..f7bb2a25 100644 --- a/BookAStar/BookAStar/App.xaml.cs +++ b/BookAStar/BookAStar/App.xaml.cs @@ -169,7 +169,10 @@ namespace BookAStar ToolbarItem tiSetts = new ToolbarItem() { Text = "Paramètres", - Icon = "ic_corp_icon.png" + Icon = "ic_corp_icon.png", + Command = new Command( + () => { NavigationService.NavigateTo(); } + ) }; ToolbarItem tiHome = new ToolbarItem() @@ -179,7 +182,6 @@ namespace BookAStar }; masterDetail.ToolbarItems.Add(tiHome); masterDetail.ToolbarItems.Add(tiSetts); - this.MainPage = masterDetail; NavigationService = new NavigationService(masterDetail.Detail.Navigation); }