MaterialDesignInXamlToolkit icon indicating copy to clipboard operation
MaterialDesignInXamlToolkit copied to clipboard

Add DialogHost.DialogCardStyle DP to allow control from calling code

Open nicolaihenriksen opened this issue 1 year ago • 0 comments

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 the DialogHost style.


This PR allows the calling code to control the style of the nested Card in the DialogHost. Default Background property is now set directly on the card, and the trigger to fall back to the default background is moved to the ControlTemplate.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 an IVisualElement, any hints you can provide?

nicolaihenriksen avatar Feb 12 '24 21:02 nicolaihenriksen