Skip to content

Creating Popup In Code-behind #16262

Answered by maxkatz6
pvogt asked this question in Q&A
Jul 8, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Styling is missing. Even if popup was transparent, all the content would be without any styles applied.
The problem is, the way how you defined Popup doesn't include any Parent information, from which styles can be inherited.
XAML does it automatically, but you need to add something like:

this.LogicalChildren.Add(_popup); // where `this` is a Window, or a parent control that hosts popup. 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pvogt
Comment options

Answer selected by pvogt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #16261 on July 08, 2024 23:25.