protected override async void OnNavigatedTo(NavigationEventArgs e) { await TitleBarHelper.SetVisibilityAsync(Visibility.Collapsed); TitleBarHelper.SetButtonBackgroundColor(Colors.Transparent); TitleBarHelper.SetButtonForegroundColor(ForegroundBrush.Color); Messenger.Default.Register <LoadContentMessage>(this, message => { HtmlViewer.NavigateToString(ViewModel.FormattedHtml); }); Messenger.Default.Register <TagsEditedMessage>(this, async message => { if (message.Item.Id == ViewModel.Item.Model.Id) { await HtmlViewer.InvokeScriptAsync("updateTagsElement", new List <string>() { ViewModel.BuildTagsHtml(message.Item) }); } }); }
protected override void OnNavigatedFrom(NavigationEventArgs e) { HtmlViewer.NavigateToString("<p></p>"); Messenger.Default.Unregister(this); }