RadRibbonView Backstage issue within PRISM region

2 posts, 0 answers
  1. leon
    leon avatar
    1 posts
    Member since:
    Dec 2012

    Posted 09 Feb 2013 Link to this post

    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.
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 14 Feb 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top