public Dialog(Window window, ICommandDialog commandDialog) { ResizeMode = ResizeMode.CanResizeWithGrip; SizeToContent = SizeToContent.WidthAndHeight; WindowStartupLocation = WindowStartupLocation.CenterScreen; ShowInTaskbar = false; Title = commandDialog.Title; Content = commandDialog; Owner = window; }
public Dialog(Window top, ICommandDialog child) { //This is necessary because on startup we won't have shown the parent window yet. Just set the parent to null. Owner = top.IsVisible ? top : null; ResizeMode = ResizeMode.CanResizeWithGrip; SizeToContent = SizeToContent.WidthAndHeight; WindowStartupLocation = WindowStartupLocation.CenterOwner; ShowInTaskbar = false; Title = child.Title; Content = child; }
public Dialog(Window top, ICommandDialog child) { //This is necessary because on startup we won't have shown the parent window yet. Just set the parent to null. Owner = top.IsVisible ? top : null; ResizeMode = ResizeMode.CanResizeWithGrip; SizeToContent = SizeToContent.WidthAndHeight; //WindowStartupLocation = Owner == null ? System.Windows.WindowStartupLocation.CenterScreen : WindowStartupLocation.CenterOwner; WindowStartupLocation = WindowStartupLocation.Manual; SetResourceReference(BackgroundProperty, "WindowBackgroundBrush"); ShowInTaskbar = false; Title = child.Title; Content = child; this.SetValue(Panel.ZIndexProperty, 1000); Closed += new System.EventHandler(Dialog_Closed); }
public void LaunchDialog(ICommandDialog dialog) { var d = _container.With(dialog).GetInstance <Dialog>(); d.ShowDialog(); }