Add DialogHost.DialogCardStyle DP to allow control from calling code #3459
+85
−34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3430
UPDATE
The outstanding issue we have with this PR is the fact that calling code can effectively set a (card) style, but several properties from that style will be ignored because they are "passed-in/hardcoded" in the
PART_PopupContentElement
element in theDialogHost
style.This PR allows the calling code to control the style of the nested
Card
in theDialogHost
. DefaultBackground
property is now set directly on the card, and the trigger to fall back to the default background is moved to theControlTemplate.Triggers
collection.@Keboo I started on writing some UI test to verify this gets passed down, but I hit a roadblock around getting the
Style
(or perhaps just the name of the style) out of anIVisualElement
, any hints you can provide?