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

tablet settings

default right handed , code completion popup looks enter image description here

when changed left handed code completion popup renders correctly enter image description here

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

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -