public NewsViewerPage() { try { InitializeComponent(); ToolbarItems?.Clear(); var bar = PageExtensions.BulidButton("\uf00d", async() => { await Navigation.PopAsync(); }); ToolbarItems.Add(bar); } catch (Exception ex) { Crashes.TrackError(ex); } }
protected override void OnAppearing() { base.OnAppearing(); if (Content == null) { try { InitializeComponent(); ToolbarItems?.Clear(); var item = PageExtensions.BulidButton("\uf1f8", () => { if (ViewModel != null) { ViewModel.RemoveAllCommand?.Execute(null); } }); ToolbarItems.Add(item); } catch (Exception ex) { Crashes.TrackError(ex); } return; } }