windows 8 - w8 default tablet settings conflicts with WPF layout -
i have wpf desktop app. i've gotten reports w8 users code completion window in our app not aligned correctly. investigated , found out setting in w8 tablet settings conflicts placement of popups in wpf
default right handed , code completion popup looks
when changed left handed code completion popup renders correctly
is there way programmaticly force app use left handed settings, or ignore renders in w7?
edit: got upwote can update solution, requires .net 4.5
private static readonly fieldinfo menudropalignmentfield; static mywindow() { menudropalignmentfield = typeof (systemparameters).getfield("_menudropalignment", bindingflags.nonpublic | bindingflags.static); system.diagnostics.debug.assert(menudropalignmentfield != null); ensurestandardpopupalignment(); systemparameters.staticpropertychanged += (s, e) => ensurestandardpopupalignment(); } private static void ensurestandardpopupalignment() { if (systemparameters.menudropalignment && menudropalignmentfield != null) { menudropalignmentfield.setvalue(null, false); } }
full code here
https://github.com/andersmalmgren/freepie/blob/master/freepie.gui/shells/mainshellview.xaml.cs
Comments
Post a Comment