From e3e85e3be511c241613026d0036b105b3f893b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20C=C3=A9sar=20Rocha?= Date: Thu, 29 Apr 2021 22:51:48 -0700 Subject: [PATCH] [GTK] Fix title setting (#50) * Set MenuPage Title in constructor --- Forms/Views/MenuPage.xaml | 5 ++--- Forms/Views/MenuPage.xaml.cs | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Forms/Views/MenuPage.xaml b/Forms/Views/MenuPage.xaml index 2adf212e..84f2acab 100644 --- a/Forms/Views/MenuPage.xaml +++ b/Forms/Views/MenuPage.xaml @@ -4,9 +4,8 @@ xmlns:local="clr-namespace:Jammit.Forms.Views" xmlns:models="clr-namespace:Jammit.Forms.Models" xmlns:xaml="clr-namespace:Jammit.Forms.Xaml" - x:Class="Jammit.Forms.Views.MenuPage" - > - + x:Class="Jammit.Forms.Views.MenuPage"> + diff --git a/Forms/Views/MenuPage.xaml.cs b/Forms/Views/MenuPage.xaml.cs index 9ee335e8..90d9d12f 100644 --- a/Forms/Views/MenuPage.xaml.cs +++ b/Forms/Views/MenuPage.xaml.cs @@ -17,7 +17,10 @@ public MenuPage() InitializeComponent(); //TODO: Bind (fails on Gtk, prints "Binding" on other platforms. - Title = Localized.MenuPage_Title; + if (Device.GTK == Device.RuntimePlatform) + Title = "Menu"; + else + Title = Localized.MenuPage_Title; } private async void OpenButton_Clicked(object sender, EventArgs e)