Creating popup windows in XBAP applications

A colleague at DevelopMentor recently asked me about creating popup windows in XAML browser applications (XBAP). Normally this is not allowed - if you try to create a top-level window you will get a SecurityException because WPF asks for UIPermission which is strictly prohibited when hosted in the browser. It turns out, however, that you can get a popup window - there's a hidden little gem in the System.Windows.Controls.Primitive namespace that is your friend: Popup. It's the same underlying … [Read more...]