private void OnShow(object sender, MessageBoxEventArgs e) { _Window = new MessageBoxWindow(); _Window.Content = this; _Window.SizeToContent = SizeToContent.WidthAndHeight; _Window.ResizeMode = ResizeMode.NoResize; _Window.WindowStyle = WindowStyle.None; _Window.Title = e.Caption; _Window.WindowStartupLocation = WindowStartupLocation.CenterScreen; _Window.ShowInTaskbar = false; _Window.Topmost = true; _Window.ShowDialog(); }
private void OnClose(object sender, MessageBoxEventArgs e) { _Window.Close(); }