QAT disappearing

Ribbon for WPF Forum

Posted 13 years ago by Stephen Curle
Version: 11.1.0541
Avatar
I notice then when the Height property of the Ribbon is set to less than 113 the QAT disappears (this is when RibbonWindow is used in place of Window).

For the UI I'm creating I want some of the ribbon features but a much narrower ribbon (much less than 113 in Height). The only problem I'm having with this is the QAT disappearing. Is there a way of preventing this ?

Comments (8)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Stephen,

You probably want to set Ribbon.IsCollapsible = false for your scenario.


Actipro Software Support

Posted 13 years ago by Stephen Curle
Avatar
I've already done that. The ribbon display OK. The problem is with the QAT. The xaml I'm using is below. If the Height is < 113 then the QAT disappears.

<ribbon:RibbonWindow x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
Title="MainWindow" Height="350" Width="525">
<ribbon:Ribbon Height="112" HorizontalAlignment="Left" Name="Ribbon1" IsCollapsible="False" VerticalAlignment="Top">
<ribbon:Ribbon.QuickAccessToolBarItems>
<ribbon:Button x:Name="btnSave" Label="Save"/>
<ribbon:Button x:Name="btnBack" Label="Back"/>
</ribbon:Ribbon.QuickAccessToolBarItems>
<ribbon:Tab Label="Home">
<ribbon:Group Label="New Group" />
</ribbon:Tab>
</ribbon:Ribbon>
</ribbon:RibbonWindow>
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Stephen,

We spent a while looking at this today and what happens is that the Ribbon (at least the QAT portion of it) starts getting clipped when the Ribbon's height is 112 or less. Techincally the QAT is rendered outside the Ribbon's normal bounds, via a RenderTransform.

We don't see anything in our code that does any clipping there so it seems to be coming from the system. We found this article explaining what could be happening:
http://drwpf.com/blog/2007/12/28/cliptoboundsmaybe/

We tried overriding the Ribbon and QuickAccessToolBar GetLayoutClip methods as prescribed but they didn't fix it.

So sorry, but I'm really not sure what to tell you on this. It doesn't seem to be anything in our code that is doing the clipping.


Actipro Software Support

Posted 13 years ago by Stephen Curle
Avatar
That's a bit strange because I've looked at the Ribbon from DevComponents and it doesn't have the same problem. Mabye they're smarter than you ;).

On a related point, is there any reason why the height of the ribbon (the part that hopsts toolbar buttons) has to be the same as Office 2010? I accept it makes sense for this to be the default because many users will want to replicate the look and feel of Office 2010 exactly, but most apps don't have as many toolbar buttons and will be able to host them all in 2 rows or even 1.

I'd suggest you allow the height of the ribbon to be adjustable. This might fix the problem with the QAT ?
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Stephen,

If you don't have a lot of toolbar buttons, then you should probably just use plain old toolbars instead of a ribbon. Ribbon is best used in scenarios where you have a moderate to large number of UI controls for a toolbar.

But more importantly, per the Microsoft specs for Ribbon:
"The Ribbon MUST be exactly tall enough to display three vertically stacked controls that use 16px by 16px icons at 96 dpi."

So by changing the ribbon height, you are violating the licensing terms to be able to use ribbon UI at all. Our product is designed to keep you in compliance with all of the ribbon specs so that you don't have any potential legal troubles in that regard. Whereas other competitors only implement some or most of the specs, we implement them all.


Actipro Software Support

Posted 13 years ago by Stephen Curle
Avatar
I wasn't aware there were licensing issues. The reason for using the ribbon control was to gain access to features such as the backstage/QAT. Obviously I could create something similar myself from scratch but thought it was easier just to hook into an existing control. If the issue can't be resolved then I'll have to try a different tack.
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Microsoft has a patent on the ribbon UI design, so per their rules you do have to comply with their specifications if you make anything similar to a ribbon layout. Our page here gives some info and links to their licensing site:
http://www.actiprosoftware.com/products/dotnet/wpf/ribbon/ribbonuiguidelines.aspx

Note that any control vendor and/or developer who works with ribbon UI's does need to meet those licensing requirements, it's not just us. It is free to sign up for them though.


Actipro Software Support

Posted 12 years ago by CharlieBear
Avatar

I have an easy work around. Set the MinHeight of the mainwindow to a value just large enough to keep the ribbon from disappearing.

Cheers

:-)

The latest build of this product (v24.1.1) 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.