Question

Contextual TabGroup implementation

Posted 4 years ago by Avatar Arthur Damen
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 4 years ago by Actipro Software Support - Cleveland, OH, USA
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 4 years ago by Arthur Damen
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 4 years ago by Actipro Software Support - Cleveland, OH, USA
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
Information The latest build of this product (2014.1 build 0602) was released 1 month ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.