private static object OnCoerceIsActive(DependencyObject d, object basevalue) { WindowControl w = d as WindowControl; if (w != null && !w._setIsActiveInternal && !w.AllowPublicIsActiveChange) { throw new InvalidOperationException( "Cannot set IsActive directly. This is handled by the underlying system"); } return(basevalue); }
private static object OnCoerceWindowStyle(DependencyObject d, object basevalue) { if (basevalue == DependencyProperty.UnsetValue) { return(basevalue); } WindowControl windowControl = d as WindowControl; if (windowControl == null) { return(basevalue); } return(windowControl.OnCoerceWindowStyle((WindowStyle)basevalue)); }
private static object OnCoerceCloseButtonVisibility(DependencyObject d, object basevalue) { if (basevalue == DependencyProperty.UnsetValue) { return(basevalue); } WindowControl windowControl = d as WindowControl; if (windowControl == null) { return(basevalue); } return(windowControl.OnCoerceCloseButtonVisibility((Visibility)basevalue)); }