My WPF application is Per-Monitor Aware and normally scales well. But when the app window is on a second monitor with scale=150% and I open a context menu it uses scale=100% from the main display making menu items quite small:
(Interestingly the submenu items use correct 150% scale)
I open the context menu setting IsOpen = true:
private void Button_Click(object sender, RoutedEventArgs e)
{
ContextMenu menu = new ContextMenu();
menu.Items.Add("item 1");
menu.Items.Add("item 2");
MenuItem submenu = new MenuItem();
submenu.Header = "submenu";
submenu.Items.Add("more 1");
submenu.Items.Add("more 2");
menu.Items.Add(submenu);
menu.IsOpen = true;
}
How to configure context menu to use display settings it is opened on, not from the default main display?