Contextual TabGroup implementation

Ribbon for WPF Forum

Posted 14 years ago by Arthur Damen
Version: 9.2.0511
Avatar
Hi,

I created a Contextual TabGroup and was wondering what the best way is to check if it must be active or not. If I put a command in the group just with normal non-contextual groups/tabs, it is not triggered because the isactive = false.

Comments (3)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Arthur,

If you create a class that inherits ContextualTabGroup and override the CanUpdateCanExecuteWhenHidden property to return true, the command's can execute will get polled even when it is not visible.


Actipro Software Support

Posted 14 years ago by Arthur Damen
Avatar
Just a question...

Why isn't it possible to use a CanUpdateCanExecuteWhenHidden property directly in the actipro contextualtabgroup ?????

<ribbon:Ribbon.ContextualTabGroups >
<ribbon:ContextualTabGroup CanUpdateCanExecuteWhenHidden="True"   >
I can't figure out as a developer why we need to do it this way.

  Public Class MyContextualTabGroup
    Inherits ActiproSoftware.Windows.Controls.Ribbon.Controls.ContextualTabGroup

    Protected Overrides ReadOnly Property CanUpdateCanExecuteWhenHidden() As Boolean
      Get
        Return True
      End Get
    End Property

  End Class
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Arthur,

It was added a while back more as an internal thing rather than something intended as an option for customers to set. But later a couple customers did want to use the mechanism, so there is a possibility in the future that we will change it like you suggested.


Actipro Software Support

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.