This is a migrated thread and some comments may be shown as answers.

RadRibbonView Backstage issue within PRISM region

1 Answer 137 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Leon
Top achievements
Rank 1
Leon asked on 10 Feb 2013, 02:53 AM
Hello,

I have placed a RadRibbonView inside a prism region.

<ItemsControl x:Name="RibbonRegion" cal:RegionManager.RegionName="RibbonRegion"></ItemsControl>

Neither the region nor the RadRibbonView have an explicit Height set. Clicking the ApplicationMenu Button, to expose the Backstage, will cause the issue described in the attached image.
The Backstage won't expand to ocuppy the whole window size, it will instead look as though it's trapped inside the region.

I came up with a temp workaround: Adding Height="143" to the region, and adding in the code behind:

MyRibbonView.Height = SystemParameters.WorkArea.Height;

will solve the problem, but will cause unexpected behavior in, for example, the help ScreenTips.

I found a post claiming that adding

<ItemsControl.ItemsPanel>
    <ItemsPanelTemplate>
      <WrapPanel />
    </ItemsPanelTemplate>
  </ItemsControl.ItemsPanel>
inside the region will make it expand when needed and solve the problem, but it does not, and makes the whole region content disappear, also.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 14 Feb 2013, 08:37 AM
Hi Leon,

The RibbonView BackstageMenu is developed to traverse the visual tree to find the last UIElement to which an adorner can be bound. However, in a PRISM solution, the Backstage can't find the ShellView Window element and bind an adorner to it and therefore the menu can't stretch to fill the Window area.

But you can use the RibbonView BackstageClippingElement. This property allows you to explicitely define the area (the panel) over which the Backstage will be displayed. In your case you can use a panel from your ShellView to stretch the Backstage to take up more space. I attached a sample solution demonstrating this approach. Please give it a try and let me know if it works for you.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RibbonView and RibbonWindow
Asked by
Leon
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or