Hi;
I have a menu system with MenuItems. Each MenuItem.Tag is assigned a name that is identical to a ChildWindow name.
All the MenuItems point to a single method. What I'm trying to do is when a menuitem is clicked, to get it's tag content which a string holding the name of the childwindow. Now that I have this Name, I don't want to have a series of IF statements to instantiate the ChildWindow based on the tag, but rather use that string as my childwindow.
Note, previously I was using pages and MS Navigation Frame and I used the following technique and worked:
private void RADMenu_Clicked(object sender, RoutedEventArgs e)
{
RadMenuItem MenuItem = sender as RadMenuItem;
string url = MenuItem.Tag.ToString();
this.ContentFrame.Navigate(new Uri(url, UriKind.Relative));
}
So, I want to do the same except instead of using URL, it will be ChildWindow name.
Thanks!
I have a menu system with MenuItems. Each MenuItem.Tag is assigned a name that is identical to a ChildWindow name.
All the MenuItems point to a single method. What I'm trying to do is when a menuitem is clicked, to get it's tag content which a string holding the name of the childwindow. Now that I have this Name, I don't want to have a series of IF statements to instantiate the ChildWindow based on the tag, but rather use that string as my childwindow.
Note, previously I was using pages and MS Navigation Frame and I used the following technique and worked:
private void RADMenu_Clicked(object sender, RoutedEventArgs e)
{
RadMenuItem MenuItem = sender as RadMenuItem;
string url = MenuItem.Tag.ToString();
this.ContentFrame.Navigate(new Uri(url, UriKind.Relative));
}
So, I want to do the same except instead of using URL, it will be ChildWindow name.
Thanks!