Hello,
I'm having some rendering issues with a HwndHost element (set as child of a Border object) that I've partially fixed using RadWindowInteropHelper.SetAllowTransparency method in a NonTrasparentWindowsGeneratedItemsFactory class.
However, there is still one problem, namely, when the window, which contains that Border element, is being maximised using the Telerik docking system, it doesn't render the content of the HwndHost element inside the Border (it looks empty). Also I've noticed that when the window is finally maximised, if the pointer goes over that empty area, the window disappears suddenly.
What could it be?
Thanks,
G.
Hello Martin,
Thanks for the reply. I already tried that example but it didn't help much, however I'll give another try. My HwndHost class, called SdlHost, uses an external C/C++ project to handle SDL 2 rendering by Core.View class. The initialisation of the SdlHost class is done roughly here:
The SDLHostElement is a Border object inside an UserControl.
<Border Name="SDLHostElement" BorderThickness="0" SizeChanged="SDLHostElement_SizeChanged"/>
The MainWindow.xaml of the app looks like this below:
<telerik:RadDocking Grid.Row="1" HasDocumentHost="False"> <telerik:RadSplitContainer Width="350"> <telerik:RadPaneGroup> <telerik:RadPane Header="{x:Static resources:StringResources.Menu_OnlineHelp}" Name="HelpPane" CanFloat="False" IsHidden="True"> <wv2:WebView2 Name="HelpBrowser"/> </telerik:RadPane> </telerik:RadPaneGroup> </telerik:RadSplitContainer> <telerik:RadSplitContainer> <telerik:RadPaneGroup> <telerik:RadPane PaneHeaderVisibility="Collapsed"> <views:ProDockingControl x:Name="DockingControl" /> </telerik:RadPane> </telerik:RadPaneGroup> <telerik:RadPaneGroup> <telerik:RadPane Header="{x:Static resources:StringResources.EventViewer}" Name="EventViewerPane" CanFloat="False" IsHidden="True"> <views2:EventViewerWindow/> </telerik:RadPane> </telerik:RadPaneGroup> </telerik:RadSplitContainer> </telerik:RadDocking>
While that ProDockingControl is this:
<telerik:RadDocking x:Name="Docking" HasDocumentHost="False" telerik:RadDocking.FloatingSize="100, 100" BorderThickness="0" Padding="0" BorderBrush="{StaticResource TransparentBrush}" PreviewShowCompass="Docking_PreviewShowCompass" Close="Docking_PaneClose" RetainPaneSizeMode="DockingAndFloating"> <telerik:RadDocking.DockingPanesFactory> <telerik:DockingPanesFactory/> </telerik:RadDocking.DockingPanesFactory> <telerik:RadDocking.GeneratedItemsFactory> <local:NonTrasparentWindowsGeneratedItemsFactory /> </telerik:RadDocking.GeneratedItemsFactory> <telerik:RadSplitContainer InitialPosition="DockedLeft"> <telerik:RadPaneGroup x:Name="MainGroup" telerik:RadDocking.SerializationTag="MainGroup" /> </telerik:RadSplitContainer> </telerik:RadDocking>
Finally I'm using the Telerik.UI.for.Wpf.60 (2023.1.315) package.
G.