Rending issue when changing ContextualTabGroups

Ribbon for WPF Forum

Posted 11 years ago by Brad Leach
Version: 4.5.0477
Avatar
Hi,

I am having an rendering problem with the following scenario: I have a Ribbon docked to the top of my window, and a DockSite with an TabMdiHost as the main content. Various buttons on and off the ribbon open new views (hosted in a document window) which are adding to the TabMdiContainer. Each view may or may not have a ContextualTabGroup, which is displayed when the (docking) tab is shown. When the views do not have focus, their ContextualTabGroups are not displayed in the ribbon.
When a view with a ContextualTabGroup is replacing another view (who also has a ContextualTabGroup), I get a flickering effect in the ribbon content. The flickering is almost certainly caused by the old views ContextualTabGroups IsActive property being set to false; the ribbon painting the "Home" tab; and then the ribbon painting the new views ContextualTabGroup (as it becomes active).

So, my question is this: Is there any way to pause the rendering of the ribbon control until after my new views ContextualTabGroup is active?

<ExtraInformationThatMightHelp>
Note that I am composing this ribbon on the fly by hooking it up to the CompositeWPF infrastructure. To show a ContextualTabGroup, I set the IsActive property of the tab group to true during the Loaded event of my views. I set the IsActive property to false during the Unloaded event. To "select" the current ContextualTabGroup, I fire an event using the IEventAggregator, which is captured by my RibbonAdapter, whose responsibility it is to activate the passed in tab to the ribbons SelectedTab property. While this isn't totally satisfactory, it works until I find a better way to implement this feature.
</ExtraInformationThatMightHelp>

Thanking you, for any help/suggestions,
-Brad

Comments (2)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Brad,

Is it just a flicker or is the rendering actually messed up following all the changes?

Can you possibly email over a very simple sample project that shows it happening to our support address?


Actipro Software Support

Posted 11 years ago by Mike Strobel - New York, NY
Avatar
Hi Brad,

Out of curiosity, are you using the latest maintenance release of WPF Studio? Bill Henning and I had identified a couple scenarios where the behavior in switching between active docking windows involved some extraneous events being fired. Bill has since made some fixes that have really smoothed out Composite WPF integration with the DockSite region adapter I developed.

I'd be glad to look over your problem if you could provide some sample code. If you are modifying your contextual tabs dynamically during view (de-)activation, then in theory the changes should complete uninterrupted before the Ribbon visuals are updated. If you really need to suspend layout updates, you could try suspending Dispatcher processing temporarily, but this really shouldn't be necessary.

Note that I'm in Shanghai for the next two weeks, so I might be a little slow to respond to messages, but I'll certainly try to keep an eye on this thread.

Cheers,
Mike
The latest build of this product (v2019.1 build 0683) 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.