I develop a WPF-UserControl. It contains a DockPanel, which contains a ribbon:Ribbon (with xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"). Within the ApplicationMenu of the Ribbon I use a Backstage:
<ribbon:Ribbon.ApplicationMenu >
<ribbon:Backstage x:Uid="ribbon:Backstage_1" x:Name="appMenu">
</ribbon:Backstage>
</ribbon:Ribbon.ApplicationMenu>
I host the WPF-UserControl within a WPF-MainWindow. When clicking on "File" to open the ApplicationMenu, the ApplicationMenu fits to the MainWindow-Borders but not to the UserControl-Borders as I would expect it.
When I remove the ribbon:Backstage from the code above and change it to:
<ribbon:Ribbon.ApplicationMenu >
<ribbon:ApplicationMenu x:Uid="ribbon:ApplicationMenu_1"></ribbon:ApplicationMenu>
</ribbon:Ribbon.ApplicationMenu>
It works as expected.
But as I would like to use the ribbon:Backstage I want to ask, how to fix/achive what I am asking for.
The code for the SampleWindow looks like that:
<Window x:Class="SampleIntegration.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Sample Window" Height="600" Width="800">
<Grid>
<Border BorderThickness="10" Margin="10" BorderBrush="Green">
<ContentControl Name="contentControl"/>
</Border>
</Grid>
</Window>
Within the contentControl I add my UserControl.
Thanks for you help and kind regards.