/// <summary>
        /// OnDeactivate
        /// </summary>
        protected override void OnDeactivate()
        {
            base.OnDeactivate();

            // Disable RealTimeInking.
            if (InkCanvas.InternalDynamicRenderer != null)
            {
                InkCanvas.InternalDynamicRenderer.Enabled = false;
                InkCanvas.UpdateDynamicRenderer();  // Kick DynamicRenderer to be removed from renderer.
            }
        }
        /// <summary>
        /// OnActivate
        /// </summary>
        protected override void OnActivate()
        {
            base.OnActivate();

            // Enable RealTimeInking.
            if (InkCanvas.InternalDynamicRenderer != null)
            {
                InkCanvas.InternalDynamicRenderer.Enabled = true;
                InkCanvas.UpdateDynamicRenderer(); // Kick DynamicRenderer to be hooked up to renderer.
            }

            //if we're activated in PreviewStylusDown or in mid-stroke, the DynamicRenderer will miss the down
            //and will not ink.  If that is the case, flag InkCollectionBehavior to reset RTI.
            _resetDynamicRenderer = EditingCoordinator.StylusOrMouseIsDown;
        }