Fragment query string

Jan 22, 2014 at 8:39 AM
Hello,

I've been searching Google and these discussions for the last 2 hours but I can't find the solution to my problem.. it's probably something easy, but I'm new to WPF and it's not that easy for a noob!

Anyway:

I got 2 pages. On page1 I do this when I click on an image:
 private void img_a_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            DefaultLinkNavigator _navigator = new DefaultLinkNavigator();
            _navigator.Navigate(new Uri("/Pages/Test.xaml#a", UriKind.Relative), this, null);
        }
I found that you can put a query in your uri reading these forums, so I add '#a' in my uri.

When I click on this it opens the Test.xaml page, in my Test.xaml code I set this:
public void OnFragmentNavigation(FirstFloor.ModernUI.Windows.Navigation.FragmentNavigationEventArgs e)
        {
            if (e.Fragment == "a")
            {
                txt1.Text = "a";
            }
        }
After reading other discussions I thought this would work, but the text in the textbox doesn't change.

I'm stuck cause of this. Once this is solved I can finally finish this project.

Hope someone can help this noob..

Thanks in advance.