Browse Source

Modify DialogsPage to allow testing of startup location.

pull/2250/head
Steven Kirk 8 years ago
parent
commit
9a2f828ba6
  1. 9
      samples/ControlCatalog/Pages/DialogsPage.xaml.cs

9
samples/ControlCatalog/Pages/DialogsPage.xaml.cs

@ -40,10 +40,13 @@ namespace ControlCatalog.Pages
};
this.FindControl<Button>("Dialog").Click += delegate
{
new MainWindow().ShowDialog(GetWindow());
var window = new Window();
window.Height = 200;
window.Width = 200;
window.Content = new TextBlock { Text = "Hello world!" };
window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
window.ShowDialog(GetWindow());
};
}
Window GetWindow() => (Window)this.VisualRoot;

Loading…
Cancel
Save