can do Command.CanExecute onto RibbonTab?

May 31, 2010 at 8:04 AM

i saw the code can do Command.CanExecute over the RibbonButton, like to disabled it on certain condition.

can I use the Command.CanExecute onto the RibbonTab?

I tried, but doesn't work.

                <Hx:RibbonTab x:Name="rTabDesign" Style="{StaticResource ReportDesignRibbonTab.Style}">
                    <Hx:RibbonTab.CommandBindings>
                        <CommandBinding CanExecute="Design_CanExecute">

        private void Design_CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute = this.ReportHasData;

Design_CanExecute never get invoked.