public ToolGesture(ToolAction action) : this() { if (!EnumValidator.IsValid(action)) { throw new ArgumentOutOfRangeException("action"); } this._toolAction = action; }
public AdornerPlacementValue(AdornerPlacementDimension term, double contribution) { if (!EnumValidator.IsValid(term)) { throw new ArgumentOutOfRangeException("term"); } this._term = term; this._contribution = contribution; }
public ToolGesture(ToolAction action, MouseButton button, ModifierKeys modifiers) : this(action, button) { this.ValidateButton(button); if (!EnumValidator.IsValid(action)) { throw new ArgumentOutOfRangeException("action"); } this._toolAction = action; this._modifiers = modifiers; }
public static void SetVerticalStretch(UIElement adorner, AdornerStretch value) { if (adorner == null) { throw new ArgumentNullException("adorner"); } if (!EnumValidator.IsValid(value)) { throw new ArgumentOutOfRangeException("value"); } adorner.SetValue(AdornerPanel.VerticalStretchProperty, (object)value); }
public ToolActionEventArgs(ToolAction toolAction, InputEventArgs sourceEvent) : base(sourceEvent == null ? (InputDevice)null : sourceEvent.Device, sourceEvent == null ? 0 : sourceEvent.Timestamp) { if (sourceEvent == null) { throw new ArgumentNullException("sourceEvent"); } if (!EnumValidator.IsValid(toolAction)) { throw new ArgumentOutOfRangeException("toolAction"); } this._toolAction = toolAction; this._sourceEvent = (EventArgs)sourceEvent; }
public ToolGesture(ToolAction action, MouseButton button) : this() { this.ValidateButton(button); if (!EnumValidator.IsValid(action)) { throw new ArgumentOutOfRangeException("action"); } this._toolAction = action; for (int index = 0; index < this._buttons.Length; ++index) { this._buttons[index] = MouseButtonState.Released; } this._buttons[(int)button] = MouseButtonState.Pressed; }
public virtual void SetNudgePlacements(ModelItem item, NudgeIntent intent, RelativeValue[] positions) { if (item == null) { throw new ArgumentNullException("item"); } if (positions == null) { throw new ArgumentNullException("positions"); } if (!EnumValidator.IsValid(intent)) { throw new ArgumentOutOfRangeException("intent"); } this.SetPlacements(item, PlacementIntent.Move, positions); }