Subscribe (RSS)

Quick Links

Recent Posts

Tags

Categories

Archive

About Actipro

Actipro Software has been creating .NET user interface control products for Windows Forms since its inception. More recently, Actipro has become a pioneer in the .NET 3.0 WPF control development arena.
Friday, 7 March 2008 04:38 by Bill Henning

Where did my Ribbon go? Ribbon hides at run-time after designing with VS 2008

This is an issue that a couple customers have run into and emailed us on, so we wanted to post more about it. 

Scenario

The scenario is that you drag a Ribbon onto a Window and everything shows up fine at design-time.    But when you go to run your application, you see a blank Window.

Why Did It Disappear?

What happened was that you probably clicked and dragged something somewhere in the Visual Studio designer that either:

  • Set the Width or Height of the Ribbon to an explicit size (very bad)
  • Set the Margin around the Ribbon to something that forces it to have a smaller than desired size
  • Did the above things to a direct container of Ribbon that affects its size

At run-time a feature of Ribbon is to collapses when there is not enough space for it.  You have full control over the threshold size at which this collapse occurs.  But one of the items in the list above would have caused this collapse code to kick in because the Ribbon is being forced smaller than desired.

Resolution

To fix this problem, simply look at the XAML for your Ribbon tag and remove any Width/Height property settings.  Also check to ensure that a Margin isn't set that could be causing this.  Then run your application and everything should appear like you would expect since now the Ribbon is not being forced to a small size.

Why Does It Show at Design-Time?

In the designer we force Ribbon to stay expanded and ignore its normal run-time collapse behavior.  This is done so that you can properly visually design the Ribbon.

Further Reading

We also have a section explaining this issue in the Ribbon control's Troubleshooting topic in the product documentation.

Tags:   , ,
Categories:   Actipro | Tips and tricks | WPF | XAML | Visual Studio 2008
Actions:   E-mail | Permalink | Comments (2) | Comment RSS



Related posts

Comments

gu said:

If some many users had problems with this "disappearing feature", don't you think it would be better to change the behaviour?
Example: Default is to show the Ribbon Bar at runtime even if it does not fit properly?

March 11. 2008 11:38
Bill Henning said:

Actually we've only had two customers ask about this. It is normally a desired run-time feature. Let me explain some more.

The official Microsoft Ribbon UI Guidelines have this item:
"The entire Ribbon SHOULD completely disappear when the application window is less than 300 pixels wide and 250 pixels tall to provide more space for displaying the document."

That is the feature that we have implemented. You have control over the threshold size (defaults to 300, 250) and can prevent it from occurring at all if you set Ribbon.IsCollapsible to false.

But again, this issue is not a bug in our control and is more an issue with people accidentally dragging something in the Visual Studio designer that forces the Ribbon to be below the collapse threshold size. As long as you don't accidentally set a hardcoded width/height on the ribbon in the designer, it will work properly at run-time and will give end users a good user experience.

March 11. 2008 12:35

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]