/// <summary> /// Callback called when the Content property's value has changed. /// </summary> /// <param name="d">Sender object</param> /// <param name="e">Callback arguments</param> private static void ContentPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ContentControl3D c = (ContentControl3D)d; if (e.OldValue != null) { c.RemoveVisual3DChild((UIElement3D)e.OldValue); } c.AddVisual3DChild((UIElement3D)e.NewValue); }
private static object ContentCoerceValue(DependencyObject d, object value) { ContentControl3D c = (ContentControl3D)d; if (c._contentJustLoadedFromSkin || c.OverridesDefaultSkin) { c._contentJustLoadedFromSkin = false; return(value); } else { return(c.Content); } }