public void Editpagemethod(object sender, RoutedEventArgs e) { EditPage newpagedashboard = new EditPage(itemname, itemlink, itemtype, itemshortcut); newpagedashboard.Owner = Window.GetWindow(this); newpagedashboard.AppMainWindow = this; EditPanel.Content = newpagedashboard; }
public void Edit(object sender, RoutedEventArgs e) { EditPage newpagedashboard = new EditPage(name, link, type, shortcut); var myObject = this.Owner as MainWindow; newpagedashboard.Owner = this.Owner; myObject.EditPanel.Content = newpagedashboard; this.Visibility = Visibility.Hidden; }