Hi
We have a very specific scenario where we need to host a legacy Windows Form control on our ribbon. This works fine when the ribbon is not minimized but the moment the ribbon does get minimized the Windows Form hosted control dissapears from view. Undoing the minimize makes the control visible again.
I have attached an example to test this out and easily recreate the isse. Start the app and click on the Test ribbon tab. You will see only a label in the "Test 2" group. Untick "minimize ribbon" from the quick access toolbar and the control will appear. Tick "minimize ribbon" again and the control will dissappear.
Hello,
I have logged this behavior with our developers in our tracking system, with an issue ID of 112082. I have also created a support ticket on your behalf with number CAS-91634-KDR2T5 in order to link the development issue to it so that you are automatically updated when a Service Release containing your fix is available for download.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support
Thank you of your patience while our Development Team was reviewing the behavior that you have described. After investigating it, it turns out that the reason for this behavior is, when the XamRibbon is minimized the tabs are displayed in a Popup, which has its AllowTransparency set to true, in order to allow rounding the edges of the popup that displays the ribbon’s tabs. If AllowTransparency property of the Popup is set to false, the WindowsFormsHost will be rendered, but it will not allow interacting with it, since the StaysOpen property of the Popup is set to false, so the popup will automatically close when a click outside of the popup is detected. This results in Popup capturing the mouse and the clicks into the Windows Forms control are ignored, since the WPF Popup is getting the mouse capture and not the hwnd of the control in the WindowsFormsHost. You can see the behavior that I have described, with the following example:
<StackPanel>
<CheckBox Content="Show Popup" x:Name="chk" />
<Popup StaysOpen="false" IsOpen="{Binding ElementName=chk, Path=IsChecked}" AllowsTransparency="False" PlacementTarget="{Binding ElementName=chk}" Placement="Bottom">
<Grid Background="Gray">
<WindowsFormsHost Width="400" Height="100">
<UI:WinFormUserControl x:Name="winFormUserControl2" Width="300" Height="50"/>
</WindowsFormsHost>
</Grid>
</Popup>
</StackPanel>
Please let me know if you need any further assistance on the matter.
Infragistics