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>