Example #1
0
        public void Start()
        {
            if (this._isStarted)
            {
                return;
            }
            IStylusPlugInSource eventSource = this.EventSource;

            if (!eventSource.ContainsStylusPlugIns(this.DynamicRenderer))
            {
                eventSource.AddStylusPlugIns(this.DynamicRenderer);
            }
            eventSource.StylusUp += this.Source_StylusUp;
            eventSource.MouseUp  += this.Source_MouseUp;
            this.DynamicRenderer.Start();
            base.IsHitTestVisible = this._needInput;
            this._isStarted       = true;
            EventHandler started = this.started;

            if (started == null)
            {
                return;
            }
            started(this, null);
        }
Example #2
0
 public void Stop()
 {
     if (this._isStarted)
     {
         this.DynamicRenderer.Stop();
         IStylusPlugInSource eventSource = this.EventSource;
         eventSource.StylusUp -= this.Source_StylusUp;
         eventSource.MouseUp  -= this.Source_MouseUp;
         eventSource.RemoveStylusPlugIns(this.DynamicRenderer);
     }
     base.IsHitTestVisible = false;
     this.InkSynchronizer.Clean();
     this._isStarted = false;
 }