In a multi monitor scenario with different scalings and an application that is configured to run ‚per monitor dpi awareness‘ a floating toolwindow cannot be docked at all positions.
Example:
Monitor 1: 1920 x 1200 (100%), Monitor 2: 2048 x 2560 (150%)
Our WPF application has a main window, maximized on screen 1 and a child window maximized on screen 2.
In the app.manifest we use per monitor dpi awareness.
Both windows have a RadDocking instance with a docked RadPane. Start the application, undock a tool window and try to dock it at the right position on monitor 1.
è It is not possible since the compass is deactivated before the mouse cursor reaches the right monitor area.
If you drag the pane from one RadDocking element to another, the ActivePane of the docking that started the drag operation is not cleared. The ActivePane should be updated (set to null, or updated in accordance to the PaneActivationMode setting) because the corresponding pane is no longer in this RadDocking instance.
To work this around, you can subscribe to and manually update the ActivePane property.
private void RadDocking_LayoutChangeEnded(object? sender, EventArgs e)
{
var docking = (RadDocking)sender;
if (docking.ActivePane != null && !docking.Panes.OfType<RadPane>().Contains(docking.ActivePane))
{
docking.ActivePane = null;
}
}
I need a behaior for RadPane like this:
When we have onl one RadPane, then show headr with a full RadPane group width (Which can be achived using PaneHeader)
In opposite - use regular tab style
Also if I undock RadPane to ToolWindow and I have only single item, I want to completely hide tabs/headers
All this should work for Top TabStripPlacement
This happens because in the current version of Telerik, the IsTopmost of the ToolWindow that host the floating pane is set to True. That was needed for a related new functionality, but it brings a major behavioral change in the RadDocking control.
To work this around, you can subscribe to the ToolWindowCreated event of RadDocking and set the IsTopmost property of the creating ToolWindow to False.
private void RadDocking_ToolWindowCreated(object sender, Telerik.Windows.Controls.Docking.ElementCreatedEventArgs e)
{
var window = (ToolWindow)e.CreatedElement;
window.IsTopmost = false;
}
In OS two monitors are configured: monitor 1 (3840x2160) scale: 200% and monitor 2 (1920x1200) scale 100%.
Our wpf application has a main window, maximized on screen 1 and a child window maximized on screen 2.
In the app.manifest we use per monitor dpi awareness:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2,PerMonitor</dpiAwareness>
</windowsSettings>
</application>
Both windows have a RadDocking instance with a docked RadPane like:
<Grid>
<telerikDocking:RadDocking Name="Docking"
HasDocumentHost="True"
telerik:DragDropGroup.Name="VDDragDropGroup">
<telerikDocking:RadDocking.DocumentHost>
...
</telerikDocking:RadDocking.DocumentHost>
<telerik:RadSplitContainer InitialPosition="DockedBottom">
<telerik:RadPaneGroup>
<telerik:RadPane Header="Test Panel" IsDockable="True">
<Border Background="Green">
<TextBlock Text="Test Panel" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</telerik:RadPane>
</telerik:RadPaneGroup>
</telerik:RadSplitContainer>
</telerikDocking:RadDocking>
</Grid>
If you drag and move the docked panel from screen 2 to screen 1 the compass at screen 1 is only shown if the mouse position is in the first quadrant of screen 1 . The compass is shown on the correct place but cannot be activated, so that no dropping is possible.
Without unsing per monitor dpi awareness everything works fine. Unfortunately we must use per monitor dpi awareness for our application.
This bug is also reproducable in V2023.3.1218.
When a RadSplitContainer with Orientation="Vertical" contains RadPaneGroup instances, resizing them causes a flicker when the ShowResizePreview property is set to False. This happens with the VisualStudio2019 theme.
For the time being, a possible workaround is to create a global Style with TargetType="RadPaneGroup" and set the Margin property to "0":
<Style TargetType="telerik:RadPaneGroup" BasedOn="{StaticResource RadPaneGroupStyle}">
<Setter Property="Margin" Value="0"/>
</Style>
The DataContext of RadPane's content is lost when showing its preview in the DockingNavigator.
As a workaround, you could set the DataContext of the content element could be set explicitly.