private void DoCancel(object sender, RoutedEventArgs e) { _closedFromButton = true; DialogResult = false; this.Close(); instance = null; }
private void DoDone(object sender, RoutedEventArgs e) { _returnText = Text; _closedFromButton = true; DialogResult = true; this.Close(); instance = null; }
public static string ShowModal(string text, string title, Window owner) { if (instance == null) { instance = new XamlEditorDialog(); } instance.Owner = owner; instance.Text = text; instance.Title = title; bool result = (bool)instance.ShowDialog(); if (result) { return(_returnText); } else { return(text); } }
public static string ShowModal(string text, string title, Window owner) { if (instance == null) { instance = new XamlEditorDialog(); } instance.Owner = owner; instance.Text = text; instance.Title = title; bool result = (bool) instance.ShowDialog(); if (result) { return _returnText; } else { return text; } }
protected override void OnClosed(EventArgs e) { instance = null; }