+void Control::UpdateBackgroundState()
+{
+ // Set the depth of the background renderer after creating/modifying it.
+ // We do this regardless of whether or not it is on stage as the index
+ // is relative and still valid if this control is re-parented.
+ if( mImpl->mBackgroundRenderer )
+ {
+ mImpl->mBackgroundRenderer.SetDepthIndex( BACKGROUND_DEPTH_INDEX );
+
+ Actor self( Self() );
+ if( self.OnStage() )
+ {
+ mImpl->mBackgroundRenderer.SetOnStage( self );
+ }
+ }
+}
+