Пример #1
0
 private TextInputDialog(TextInputViewModel dataContext)
 {
     Validate.IsNotNull(dataContext, "dataContext");
     InitializeComponent();
     DataContextChanged += OnDataContextChanged;
     DataContext         = dataContext;
 }
Пример #2
0
 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);
 }