예제 #1
0
    public override void OnApplyTemplate()
    {
        base.OnApplyTemplate();

        if (!IsMinimizable)
        {
            IsMinimizedProperty.OverrideMetadata(typeof(ExRibbon),
                                                 new FrameworkPropertyMetadata(false, (o, e) => { }, (o, e) => false));
        }
    }
예제 #2
0
    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));
    }