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

php - How should I create my API for mobile applications (Needs Authentication) -

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

5 Reasons to Blog Anonymously (and 5 Reasons Not To)