private void cmdCreate_Click(object sender, RoutedEventArgs e) { WindowOwnership win = new WindowOwnership(); win.Owner = this; win.Title = "Owned Window"; win.Height = this.Height/2; win.Width = this.Width/2; win.WindowStartupLocation = WindowStartupLocation.CenterOwner; win.Show(); }
private void cmdCreate_Click(object sender, RoutedEventArgs e) { WindowOwnership win = new WindowOwnership(); win.Owner = this; win.Title = "Owned Window"; win.Height = this.Height / 2; win.Width = this.Width / 2; win.WindowStartupLocation = WindowStartupLocation.CenterOwner; win.Show(); }
private void OnCreateOwnedWindow(object sender, RoutedEventArgs e) { var win = new WindowOwnership { Owner = this, Title = "Owned Window", Height = Height / 2, Width = Width / 2, WindowStartupLocation = WindowStartupLocation.CenterOwner }; win.Show(); }