同样问题参照:

https://stackoverflow.com/questions/18113597/wpf-handedness-with-popups

解决方案:

 

private static void FixPopupBug()
        {
            var ifLeft = SystemParameters.MenuDropAlignment;
            if (ifLeft)
            {
                var t = typeof(SystemParameters);
                var field = t.GetField("_menuDropAlignment", BindingFlags.NonPublic | BindingFlags.Static);
                field?.SetValue(null, false);
            }

        }

  启动程序的时候调用下就可以了

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2021-06-27
  • 2022-12-23
相关资源
相似解决方案