/// <summary> /// Protected virtual version for developers deriving from InkCanvas. /// This method is what actually throws the event. /// </summary> /// <param name="e">DrawingAttributesReplacedEventArgs to raise the event with</param> protected virtual void OnDrawingAttributesReplaced(DrawingAttributesReplacedEventArgs e) { if (e == null) { throw new ArgumentNullException("e"); } if (null != this.DrawingAttributesReplaced) { DrawingAttributesReplaced(this, e); } }
private void OnDrawingAttributesReplaced(Object sender, DrawingAttributesReplacedEventArgs args) { // If the drawing attributes change involves Width, Height, StylusTipTransform, IgnorePressure, or FitToCurve, // we need to invalidate if (false == DrawingAttributes.GeometricallyEqual(args.NewDrawingAttributes, args.PreviousDrawingAttributes)) { Invalidate(); } }
protected virtual new void OnDrawingAttributesReplaced(DrawingAttributesReplacedEventArgs e) { }
protected virtual void OnDefaultDrawingAttributesReplaced(object sender, DrawingAttributesReplacedEventArgs e) { DrawingAttributesReplacedEventHandler handler = DefaultDrawingAttributesReplaced; if (handler != null) handler(this, e); }
private void announceDrawingAttributesChanged(object sender, DrawingAttributesReplacedEventArgs e) { Commands.ActualReportDrawingAttributes.ExecuteAsync(this.DefaultDrawingAttributes); }