Ribbonbar Tab content are not visible

Ribbon for WPF Forum

Posted 16 years ago by Anurodh Ora
Version: 4.5.0486
Avatar
Hi,

We have created Ribbonbar with 5 Tabs on it. Each Tab has 10 to 15 menu items (Ribbon buttons, popup buttons) which are enable/disabled according to requirement at runtime. Currently some of the items (ribbon button) have command binding associated with it.

Now the problem what we are facing here is that, when our application is starting we are enabling/disabling some menu items on initialize. Now the (Ribbon)Tabs which are not currently active (as at a time only one Tab can be active) and the menu items in these tabs which have command binding, have IsVisible property as "false" and because of that if we are setting its enable property to "true" but still it remains "false" as it is not visible.

Depend on menu items enable property we are performing some other operations.

It works as expected for the menu items which have no command binding and for the menu items which are present on the Active Tab irrespective of its command binding.

Once in a application if Tabs are activated then it works fine.

We tried to make all menu items visible irrespective of which Tabs are activated and irrespective of its command binding, by making its "Visibility" property equals to "visible" in xaml file (at design time) but still we are facing same problem.

Please suggest how can we get all menu items visible? This problem is only for the menu items having command binding.

We dont want to do it at runtime i.e. we don't want to write a code which makes all the menu items visible on initialize. It should be visible by default on its initialize as it works for other menu items which has no command binding.

Thanks,
Anurodh

Comments (1)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Anurodh,

Right now since there are usually hundreds of controls in a ribbon, we have an optimization to not update the enabled state of controls that are invisible since it takes more processing time to do so.

You can override this by creating custom classes like make a class that inherits the ribbon's Button class and override this:
protected override bool CanUpdateCanExecuteWhenHidden {
    get {
        return true;
    }
}
Try that and use your custom Button class instead of ribbon:Button and let us know if that resolves the issue there.

We may consider adding a global setting on RibbonUIControlService instead that you'd just toggle on at app startup if you want it.


Actipro Software Support

The latest build of this product (v24.1.3) was released 26 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.