private static object OnCoerceFocusable(DependencyObject d, object baseValue) { RibbonButton button = (RibbonButton)d; if (button.CoerceFocusable) { return false; } return baseValue; }