.net - WPF Handedness with Popups -
i moved pc windows 8 windows 7 , while running our wpf application noticed our wpf popups and/or tool tips in lower-left default instead of normal lower right. has noticed this? know can specify location on each tooltip in xaml, have lot of tool tips , popups. want know if there way specify default location globally in wpf app. google hasn't yielded many results on subject. have reason keep them in same original default position (some popups have content relative start position).
windows 8: (lower left)
windows 7: (lower right)
same code! standard "tooltip" xaml attribute.
any ideas?
resolved , posted comments
ok, have found issue. has tablet pcs/touchscreens. (left handed.. right handed preference) other link provided reason. working on solution resolve now. ill post details soon!
thanks @traviswhidden solution. implemented improved version of listens staticpropertychanged event, i'll paste in here because seems less of "hack".
private static readonly fieldinfo _menudropalignmentfield; static mainwindow() { _menudropalignmentfield = typeof(systemparameters).getfield("_menudropalignment", bindingflags.nonpublic | bindingflags.static); system.diagnostics.debug.assert(_menudropalignmentfield != null); ensurestandardpopupalignment(); systemparameters.staticpropertychanged += systemparameters_staticpropertychanged; } private static void systemparameters_staticpropertychanged(object sender, propertychangedeventargs e) { ensurestandardpopupalignment(); } private static void ensurestandardpopupalignment() { if (systemparameters.menudropalignment && _menudropalignmentfield != null) { _menudropalignmentfield.setvalue(null, false); } }
Comments
Post a Comment