private void help_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (_IsTopicPresent()) { HelpTopics topics = App.Current.HelpTopics; HelpTopic topic = topics.GetTopic(AppPages.PagePaths.MainPage); Debug.Assert(null != topic); HelpLinkCommand cmd = new HelpLinkCommand(topic.Path, topic.Key); cmd.Execute(null); } }
/// <summary> /// Initialize control with help text. /// </summary> private void _InitQuickHelpText() { HelpTopic topic = ((PageBase)this._Page).HelpTopic; if (null != topic) { QuickHelpText.Inlines.Clear(); List<Inline> inlines = new List<Inline>(); if (!string.IsNullOrEmpty(topic.QuickHelpText)) QuickHelpText.Inlines.Add(topic.QuickHelpText.Trim()); if (!string.IsNullOrEmpty(topic.Key) || !string.IsNullOrEmpty(topic.Path)) { if (!string.IsNullOrEmpty(topic.QuickHelpText)) QuickHelpText.Inlines.Add(" "); Hyperlink helpLink = new Hyperlink(new Run((string)App.Current.FindResource("QuickHelpLinkCaption"))); _command = new HelpLinkCommand(topic.Path, topic.Key); helpLink.Command = _command; QuickHelpText.Inlines.Add(helpLink); } } }