public void CreateCustomParameter() { var paramCreator = new ParameterCreator(); paramCreator.Title = "Create parameter"; paramCreator.TextBlockDescription.Text = "Modify the properties of the parameter. Press OK to finalize the parameter"; if (this.ParameterValue == null) { var typeSelector = GetTypeSelector(ParameterType); typeSelector.ShowDialog(); if (!typeSelector.DialogResult.Value) { return; } paramCreator.RootTarget = typeSelector.Instance; } else { paramCreator.RootTarget = this.ParameterValue; } paramCreator.ShowDialogEx(this); if (paramCreator.DialogResult.HasValue && paramCreator.DialogResult.Value) { ParameterValue = null;//To force a property changed ParameterValue = paramCreator.RootTarget; } }
private void ChangeTarget_Click(object sender, RoutedEventArgs e) { if (this.RootTarget == null) { return; } var paramCreator = new ParameterCreator(); paramCreator.TextBlockDescription.Text = "Delve into the new desired target by double-clicking on the property. Clicking OK will select the currently delved property to be the new target."; paramCreator.Title = "Change Target"; paramCreator.RootTarget = this.RootTarget; paramCreator.ShowDialogEx(this); if (paramCreator.DialogResult.HasValue && paramCreator.DialogResult.Value) { this.Target = paramCreator.SelectedTarget; } }