//---------------------------------------------------------------------- // // Internal Methods // //---------------------------------------------------------------------- #region Internal Methods /// <summary> /// /// </summary> internal object StateChangedCallback(object arg) { object[] argArray = arg as object[]; HostStateFlags stateFlags = (HostStateFlags)argArray[0]; // // Check if world transform of the host has changed and // update cached value accordingly. // if ((stateFlags & HostStateFlags.WorldTransform) != 0) { _worldTransform = (Matrix)argArray[1]; } // // Check if clip bounds have changed, update cached value. // if ((stateFlags & HostStateFlags.ClipBounds) != 0) { _worldClipBounds = (Rect)argArray[2]; } // // Set corresponding flags on the root visual and schedule // render if one has not already been scheduled. // if (_rootVisual.Value != null) { // // When replacing the root visual, we need to re-realize all // content in the new tree // Visual.PropagateFlags( _rootVisual.Value, VisualFlags.IsSubtreeDirtyForPrecompute, VisualProxyFlags.IsSubtreeDirtyForRender ); } return(null); }