RadRibbonView size issue when passed through Managed AddIn Framework Pipeline

2 posts, 0 answers
  1. Usman
    Usman avatar
    18 posts
    Member since:
    Dec 2018

    Posted 24 Sep Link to this post

    Hi,

    I'm working on an Managed Addin Framework (MAF) based application in which the RibbonView is returned from the AddIn's appdomain to the AddIn-Host appdomain. The issue I'm facing is that when the RibbonView is converted to and from FrameworkElement/INativeHandleContract, it loses most of the functionality. On the host side, collapsing RibbonView doesn't properly resize. The ribbon view collapsed but some other control is taking the place and the controls below that do not get resized to occupy the whole space. I want the controls which are below the ribbon to occupy the space, as shown in the images attached.

    The issue can be reproduced easily by following code sample:

    RadRibbonView ribbon = new RadRibbonView();
                ribbon.MinimizeButtonVisibility = Visibility.Visible;
                ribbon.MinimizedChanged += Ribbon_MinimizedChanged;

                var tab = new RadRibbonTab();
                tab.Header = "Tab 01";

                var group = new RadRibbonGroup();
                group.Header = "Group 01";

                var command = new RadRibbonButton();
                command.Text = "Hello";

                group.Items.Add(command);

                tab.Items.Add(group);

                ribbon.Items.Add(tab);

                var contract = FrameworkElementAdapters.ViewToContractAdapter(ribbon);

                var control = FrameworkElementAdapters.ContractToViewAdapter(contract);

                presenter.Content = control;

     

    And here is the sample xaml:

       <Grid
            x:Name="RootGrid"
            Background="Azure"
            ShowGridLines="True">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <ContentPresenter x:Name="presenter" />

        </Grid>

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1031 posts

    Posted 27 Sep Link to this post

    Hi Usman,

    Thank you for the provided images and code snippets.

    I tested this behavior with a standard MS Expander as well and observed a similar result. I've prepared a small sample project to demonstrate this. This leads me to believe that this issue is not specific from the controls from the UI for WPF suite, but is rather a limitation of the framework.

    I can suggest forwarding your inquiry to the MSDN forums to get adequate help as such scenarios go out of the scope of the support services we provide.

    If I can, however, assist you with anything else that does fall within our scope, I'd be more than happy to do so.

    Regards,
    Dilyan Traykov
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top