You could bind the IsEnabled on each HyperLink to a global property. You can set the property from code and thereby disable the navigation.
MainPage.cs
public partial class MainPage : UserControl
{
public bool IsNavigationEnabled
{
get { return (bool)GetValue(IsNavigationEnabledProperty); }
set { SetValue(IsNavigationEnabledProperty, value); }
}
public static readonly DependencyProperty IsNavigationEnabledProperty =
DependencyProperty.Register("IsNavigationEnabled", typeof(bool), typeof(MainPage), null);
public MainPage()
{
InitializeComponent();
DataContext = this;
}
...
MainPage.xaml
<HyperlinkButton
x:Name="Link1"
IsEnabled="{Binding IsNavigationEnabled}"
Style="{StaticResource LinkStyle}"
NavigateUri="/Home"
TargetName="ContentFrame"
Content="home" />
Home.xaml.cs
private void Button_Click(object sender, RoutedEventArgs e)
{
MainPage page = (MainPage)Application.Current.RootVisual;
page.IsNavigationEnabled = !page.IsNavigationEnabled;
}