Skip to content

DialogHost.Show() with a specific style #3114

Closed Answered by nicolaihenriksen
ElieTaillard asked this question in Q&A
Discussion options

You must be logged in to vote

@Xaalek I don't think that is currently possible. You statically define this with Style="{StaticResource ...}" directly on the DialogHost element.

So I guess what you're requesting is to specify a "temporary" style to use for this particular call to DialogHost.Show()?

I guess it would be possible to introduce a scheme to temporarily inject a style. This could either be in the DialogHost.Show() overloads, or perhaps you need a utility method which will find the relevant DialogHost and apply a given style on it (which you could call from your ViewModel - although that smells a little; but so does calling DialogHost.Show() from your VM one could argue).

There may be some challenges with "whe…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@nicolaihenriksen
Comment options

@Keboo
Comment options

@ElieTaillard
Comment options

ElieTaillard Mar 1, 2023
Collaborator Author

@nicolaihenriksen
Comment options

@ElieTaillard
Comment options

ElieTaillard Mar 1, 2023
Collaborator Author

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