c# - Set Window owner inside of an UserControl in WPF -


i have usercontrol shows window without icon in taskbar, problem when main window lost focus , again window without taskbar icon behind main window , difficult show in front again, issue solved using window.owner = this; when class window, when usercontrol or other type (e.g. listboxitem, viewbox) can't this. tried control.owner = (window)this; result throws exception grid cannot converted window

use

window.owner = window.getwindow(this); 

Popular posts from this blog

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -

Apache NiFi ExecuteScript: Groovy script to replace Json values via a mapping file -