protected override void OnMouseDown(MouseButtonEventArgs e) { if (e.ChangedButton == MouseButton.Left) { if (this.engine == null) { this.engine = new PickWhipEngine(this.PickWhipHost); } if (!this.engine.IsActive) { this.engine.BeginEditing(); e.Handled = true; } } base.OnMouseDown(e); }
private void OnPropertyMarkerCommandsElementPropertyBindingCommand(object sender, ExecutedRoutedEventArgs eventArgs) { SceneNodeProperty associatedProperty = this.AssociatedProperty; if (associatedProperty != null) { SceneView activeView = associatedProperty.SceneNodeObjectSet.DesignerContext.ActiveView; if (activeView != null) { activeView.ReturnFocus(); } if (this.elementPropertyPicker == null) { this.elementPropertyPicker = new PickWhipEngine((FrameworkElement)this, associatedProperty, (IElementSelectionStrategy) new CreatePropertyBindingPickWhipStrategy(associatedProperty.Reference.LastStep), ToolCursors.PickWhipCursor); } this.elementPropertyPicker.BeginEditing(); } eventArgs.Handled = true; }