Navigate

The Hyperlink control in WPF is very powerful, but it is hard to make them work outside pages.

Add the following XML namespaces:

xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:catel="http://schemas.catelproject.com"

To execute the NavigateUrl, simply use the behavior as shown below:

<TextBlock>
    <Hyperlink NavigateUri="http://schemas.catelproject.com">
        <i:Interaction.Behaviors>
            <catel:Navigate />
        </i:Interaction.Behaviors>

        <TextBlock Text="The best MVVM Framework" />
    </Hyperlink>
</TextBlock>

Contributions

We would like to thank the following contributors:

Want to contribute to the documentation? We have a guide for that!


Questions

Have a question about Catel? Use StackOverflow with the Catel tag!


Discussion