Completed
Last Updated: 02 Oct 2023 08:21 by ADMIN
Release R3 2023
Martin Ivanov
Created on: 25 Aug 2023 16:55
Category: RibbonView
Type: Bug Report
0
RibbonWindow: The window titlebar is higher than expected in the Windows11 and Crystal themes

The RadRibbonWindow titlebar is higher than expected when the Windows 11 theme is used. 

A side effect of this is that the content overlaps the titlebar, when the content is not a RadRibbonView. 

This reproduces when the Windows11 and Crystal themes are used. To reproduce it, the IsWindowsThemeEnabled property should be set to false in order for the Telerik theme to get applied to the window.

To work this around, you can use the visual tree helper methods in the Loaded event of RadRibbonWindow in order to get the corresponding visuals and change their size and offset.

private void RadRibbonWindow_Loaded(object sender, RoutedEventArgs e)
{
	var windowDecoratorPanel = this.ChildrenOfType<Grid>().FirstOrDefault(x => x.Name == "MaximizeWindowDecorator");
	var titleBarPanel = windowDecoratorPanel.FindChildByType<Grid>();
	titleBarPanel.RowDefinitions[0].Height = new GridLength(30);

	var clientArea = windowDecoratorPanel.ChildrenOfType<Border>().FirstOrDefault(x => x.Name == "PART_ClientAreaBorder");
	clientArea.Margin = new Thickness(0);
}

0 comments