public MessageWindow(string title, string text, MessageWindowButtons buttons) { WindowTitle = title; Text = text; DataContext = this; Owner = App.Current.MainWindow; Result = MessageWindowResult.Unknown; WindowStartupLocation = WindowStartupLocation.CenterOwner; InitializeComponent(); ShowButtons(buttons); }
public void ButtonClicked(MessageWindowResult result) { Result = result; Close(); }