public override void OnApplyTemplate() { base.OnApplyTemplate(); if (!IsMinimizable) { IsMinimizedProperty.OverrideMetadata(typeof(ExRibbon), new FrameworkPropertyMetadata(false, (o, e) => { }, (o, e) => false)); } }
public override void OnApplyTemplate() { base.OnApplyTemplate(); IsMinimizedProperty.OverrideMetadata(typeof(ExRibbon), new FrameworkPropertyMetadata(false, (o, e) => { }, (o, e) => false)); Type ownerType = typeof(ExRibbon); CommandManager.RegisterClassCommandBinding(ownerType, new CommandBinding(RibbonCommands.MinimizeRibbonCommand, null, MinimizeRibbonCanExecute)); }