How can I get a title link to open a .chm file?

Aug 13, 2013 at 11:46 AM
I have a .chm help file I want to open when a title link 'help' is clicked on. Any way to do this rather than navigate to another page?
Aug 19, 2013 at 12:43 PM
Nobody have any ideas? Surely a title link can be set to open an external file?
Coordinator
Aug 19, 2013 at 12:53 PM
At this point in time the title links are limited to content sources that are loaded in the content frame. Agree it should allow for other links as well (such as those supported by BBCodeBlock). I have plans to change this in a future mui update.
Aug 19, 2013 at 12:54 PM
Any pointers how I could implement this? Really need it for an app i'm working on.
Coordinator
Aug 19, 2013 at 1:06 PM
The TitleLinks are visualized using an ItemsControl with Button elements where each Button is bound to a NavigationCommand.GoToPage command (see Themes\ModernWindow.xaml).

You'll need to replace the NavigationCommand.GoToPage with some other command that supports both navigation of content sources and other links.
Aug 20, 2013 at 10:29 AM
Edited Aug 20, 2013 at 10:30 AM
I actually use a title link as a SAVE button. The way it works is I trap the navigation in the NavigatingFrom event in any given page/control. I created a blank control called "SaveControl.xaml" so that I could set the Source in the title link but I never actually navigate to the control because I of e.Cancel = true:
<mui:ModernWindow.TitleLinks>
    <mui:Link DisplayName="Save" Source="/Views/Controls/SaveControl.xaml" />
    <mui:Link DisplayName="Settings" Source="/Views/SettingsView.xaml" />
</mui:ModernWindow.TitleLinks>


// if save clicked then cancel navigation and save all changed data
if (e.Source == new Uri("/Views/Controls/SaveControl.xaml", UriKind.Relative))
{
   e.Cancel = true;
   Save();
}
It's very messy but you could do that same and open you chm file this way.
Aug 20, 2013 at 10:39 AM
Ah I see, yes good idea. Although does mean you have to add this to every page in your application?
Aug 20, 2013 at 12:20 PM
Only to the top level pages such as "Welcome", "Layout", "Controls" and "Advanced" (from the ModernUI demo application).