Detecting when the desktop in Windows 8.x is snapped in WPF -


i have windowless, chromeless wpf application sits maximized on desktop. when desktop gets snapped, application gets cut off. likewise, when application starts in snapped desktop, steals focus of entire monitor.

i need update visible elements no longer cut off windows 8.x snap. there event or api let code react change?

subscribe sizechanged event of "mainwindow". event fire whenever user changes size or size changed due modern app snapping. event not fire if setting width , height static.

public mainwindow() {     initializecomponent();     this.sizechanged += onsizechanged; }  private void onsizechanged(object sender, sizechangedeventargs     sizechangedeventargs) {     system.diagnostics.debug.writeline(sizechangedeventargs.newsize);             } 

Popular posts from this blog