Last Updated: 27 Jul 2017 17:53 by ADMIN
Martin Ivanov
Created on: 27 Jul 2017 17:52
Category: RibbonView
Type: Bug Report
RibbonWindow: The titlebar height is wrong when the Windows title bars text size is bigger than the default one
The default size is 9. If you change it the issue occurs. This brings a visual glitch in the window. The title text is resized but the titlebar is not.

Note: This is reproducible only if the DPI is larger than 100%.

To work this around manually set the size of the titlebar element.

private void MainWindow_Loaded(object sender, RoutedEventArgs e)
    Grid windowDecorator = this.ChildrenOfType<Grid>().FirstOrDefault(x => x.Name =="MaximizeWindowDecorator");
    RibbonTitleBarPanel ribbonTitlePanel = this.ChildrenOfType<RibbonTitleBarPanel>().FirstOrDefault(x => x.Name == "RibbonTitleBarPanel");
    windowDecorator.RowDefinitions[0].Height = newGridLength(ribbonTitlePanel.ActualHeight);