private static void SelectString(SelectStringMessage message) { Window sender = message.Target as Window; SelectStringViewModel viewModel = new SelectStringViewModel(message.Title, message.MaxLength, message.StringValue); SelectStringWindow dlg = new SelectStringWindow(viewModel) { Owner = sender }; if (dlg.ShowDialog() != true) { return; } message.Accepted = true; message.StringValue = viewModel.Value; }
public SelectStringWindow(SelectStringViewModel viewModel) { this.ViewModel = viewModel.ValidateNotNull(nameof(viewModel)); this.InitializeComponent(); }