Approved
Last Updated: 14 Nov 2017 11:26 by ADMIN
ADMIN
Martin Ivanov
Created on: 14 Nov 2017 11:25
Category: RibbonView
Type: Bug Report
0
RibbonView: The content popup is sized wrongly in scenario with different monitors resolution or different DPI
The popup is no properly sized when you have two or more monitors with different resolutions. This is replicable also if the DPI is higher than 100%.

To work this around you can create a custom ribbonview, get the content presenter of the popup and manually set its Width. Here is an example in code:

public class CustomRibbonView : RadRibbonView
{
	private ContentPresenter selectedTabContentPopup;

	public override void OnApplyTemplate()
	{
		base.OnApplyTemplate();
		this.selectedTabContentPopup = this.GetTemplateChild("SelectedTabContentPopup") as ContentPresenter;
	}

	protected override void OnMinimizedPopupStateChanged(RadRoutedEventArgs e)
	{   
		base.OnMinimizedPopupStateChanged(e);
		if (this.IsMinimizedPopupOpen)
		{
			this.selectedTabContentPopup.Width = this.ActualWidth;
		}
	}
}
0 comments