Skip to content

Is it possible to display it in a popupbox in WPF? #7806

Answered by miloush
VahidEra asked this question in Q&A
Discussion options

You must be logged in to vote

What doesn't go together is WS_EX_LAYERED (a type of transparent window) and Win32 children windows (Winforms controls). In other words you can show WindowsFormsHost in a Popup, but it cannot be transparent in traditional WPF sense. You either disable transparency (Popup.AllowsTransparecncy = False), or, you use Win32 window rather than WPF window to host the popup, or, you use more complicated techniques like SetLayeredWindowAttribute API.

Unfortunately for you, the Material Design is relying on the transparency to make popups with blurred edges. To see what I mean, in your sample project you can do this:

<md:PopupBox.Resources>
    <Style TargetType="md:PopupEx">
        <Style.Triggers…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@VahidEra
Comment options

@miloush
Comment options

Answer selected by VahidEra
@VahidEra
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants