ContextualTabGroup IsActive Property

Ribbon for WPF Forum

Posted 15 years ago by Mark Hanson
Version: 4.5.0484

Can somebody tell me how ContextualTabGroup IsActive Property and Visibility work together?
Why ContextualTabGroup Visibility doesn't work?
Why Command doesn't execute when ContextualTabGroup IsActive Property is false (i.e. the Command CanExecute handler is not hit anymore)?
How cand I put a binding on IsActive Property. I don't want to set it from codebehind.


Comments (3)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA

Altering IsActive will alter the Visibility of the contextual tab group. You should always set IsActive and not Visibility directly.

I believe back when it was created we had issues when trying to use Visibility directly and thus added the IsActive. However since it has been a couple years since that code was written, I don't recall what the particular issue was.

If you are having specific problems then we'd need you to put together a simple sample project that shows the issue and email that over to our support address. Thanks.

Actipro Software Support

Posted 12 years ago by Rory Plaire

The behavior of the ribbon when we use the Visibility property instead of the IsActive property is very confusing. Please refer to the attached image.

The XAML for the above window is as follows.

<ribbon:RibbonWindow x:Class="ContextualTabsGroupIssues.MainWindow"
            <ribbon:Tab Label="Item 1" />
            <ribbon:Tab Label="Item 2" />
            <ribbon:Tab Label="Item 3" />
            <ribbon:ContextualTabGroup Visibility="Visible" Label="ContextItems">
                <ribbon:Tab Label="Item 1" />
                <ribbon:Tab Label="Item 2" />

Unfortunately, since setting Visibility directly doesn't crash the app, but insteads degrades quite ungracefully, it is very difficult to debug this issue. We spent a lot of time with debugging why the ribbon was displaying this way.

While I can appreciate that there maybe technical limitations to using Visibility directly, I think it is poor form to not guard against it with at least some kind of exception, and instead to fail without any obvious recourse.

[Modified 12 years ago]

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Rory,

Our documentation on the control says to use IsActive, as does all our samples.  Please don't access the Visibility property directly and instead use IsActive to control the visibility of your contextual tab groups.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.