void BtnDuration_Click(object sender, RoutedEventArgs e) { if (String.IsNullOrWhiteSpace(this.StartEvent.Text) || String.IsNullOrWhiteSpace(this.StopEvent.Text)) { return; } QueryModel queryModel = new QueryModel(this.Model); DurationWindow durationWindow = new DurationWindow(); durationWindow.Model = queryModel; durationWindow.ShowDuration(this.FilterModel.Resolver, this.Model.StartTime, this.Model.StopTime, this.StartEvent.Text, this.StopEvent.Text); }