/// <summary> /// Creates the wet stroke update source /// </summary> /// <param name="inkPresenter">the ink presenter</param> /// <returns>a new <see cref="XCoreWetStrokeUpdateSource"/> object</returns> public static XCoreWetStrokeUpdateSource Create(IInkPresenter inkPresenter) { if (inkPresenter == null) { throw new ArgumentNullException(nameof(inkPresenter)); } return(new XCoreWetStrokeUpdateSource(inkPresenter)); }
/// <summary> /// Initializes a new instance of the UWPCoreWetStrokeUpdateSource class /// </summary> /// <param name="inkPresenter">the ink presenter</param> public UWPCoreWetStrokeUpdateSource(IInkPresenter inkPresenter) : base(inkPresenter) { if (inkPresenter is UWPInkPresenter uwpInkPresenter) { _updateSource = CoreWetStrokeUpdateSource.Create(uwpInkPresenter.InkCanvas.InkPresenter); _updateSource.WetStrokeCanceled += OnWetStrokeCanceled; _updateSource.WetStrokeCompleted += OnWetStrokeCompleted; _updateSource.WetStrokeStarting += OnWetStrokeStarting; _updateSource.WetStrokeStopping += OnWetStrokeStopping; _updateSource.WetStrokeContinuing += OnWetStrokeContinuing; } }
/// <summary> /// Initializes a new instance of the XCoreWetStrokeUpdateSource class. /// </summary> /// <param name="inkPresenter">the ink presenter</param> protected XCoreWetStrokeUpdateSource(IInkPresenter inkPresenter) { InkPresenter = inkPresenter; InkPresenter.WetStrokeUpdateSource = this; }
/// <summary> /// Create a new Core wet stroke update source /// </summary> /// <param name="inkPresenter">the ink presenter</param> /// <returns>a new <see cref="UWPCoreWetStrokeUpdateSource"/> object</returns> public XCoreWetStrokeUpdateSource Create(IInkPresenter inkPresenter) { return(new UWPCoreWetStrokeUpdateSource(inkPresenter)); }