private TextInputDialog(TextInputViewModel dataContext) { Validate.IsNotNull(dataContext, "dataContext"); InitializeComponent(); DataContextChanged += OnDataContextChanged; DataContext = dataContext; }
private static bool Show(TextInputViewModel dataContext, out string text) { new TextInputDialog(dataContext).ShowModal(); if (dataContext.IsCancelled) { text = null; return(false); } text = dataContext.Text; return(true); }