This project is read-only.

Accessing parent Moderntap page from a child

Jun 19, 2013 at 9:51 PM
I need to add new tab to a moderntab page from within the child.
Can someone please help me with how I can achieve this.
Jun 24, 2013 at 11:14 AM
Edited Jun 24, 2013 at 11:15 AM
// this <- your current child
ModernTab parentMT = 
    ((Grid)((ModernFrame)this.Parent).Parent).TemplatedParent as ModernTab; 
Link newLink = new Link()
    DisplayName = "NewTab",
    Source = new Uri("/YourPage.xaml", UriKind.Relative)