public DlgWindow(CustomDlg content) { SizeToContent = SizeToContent.WidthAndHeight; WindowStartupLocation = WindowStartupLocation.CenterOwner; Owner = ST_Utils.MainWindow; if (!string.IsNullOrEmpty(content.WindowTitle)) { Title = content.WindowTitle; ResizeMode = ResizeMode.NoResize; } else { this.WindowStyle = WindowStyle.None; } Content = content; }
public static void ShowDialog(CustomDlg content) { new DlgWindow(content).ShowDialog(); }