Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

nicolaihenriksen
Copy link
Contributor

Fix for #2658

Split Card template into 2 styles: Elevated and Outlined.

For the outlined style, I was unsure whether to add a new color or use an existing one. It was not 100% clear where I should add that color if I wanted it, so I opted to reuse the MaterialDesignDivider brush which seems to resemble the dimmed look from the material.io design pretty well.

Added unit test for newly added converter and UI tests for newly added card style.

In order to get the UI tests to run, I had to include Generic.xaml in the merged resources dictionary. I think this "happens automatically" when running a WPF app, but for the test it seemed necessary to add manually. Perhaps this is something that should be included in the XAMLTest library instead?

Default card style is now MaterialDesignElevatedCard and a new alternative style, MaterialDesignOutlineCard added.
Also ensured the DoubleToCornerRadiusConverter returns a CornerRadius of 0 for negative values.
@nicolaihenriksen
Copy link
Contributor Author

I was a little unsure of whether I should merge two nested Borders into one, but I left it as 2 which were "copied" from the Elevated style and modified to not use the drop shadow, but have a solid border instead.

@ElieTaillard ElieTaillard requested a review from Keboo July 2, 2022 13:29
Copy link
Member

@Keboo Keboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really great work! I appreciate the additional tests that you added as well.

@Keboo Keboo added enhancement visual breaking change Items here have affected the visual look of controls. release notes Items are likely to be highlighted in the release notes. labels Jul 5, 2022
@Keboo Keboo added this to the 4.6.0 milestone Jul 5, 2022
@Keboo Keboo merged commit 3f50f00 into MaterialDesignInXAML:master Jul 5, 2022
@nicolaihenriksen nicolaihenriksen deleted the fix2658 branch July 5, 2022 07:42
@ElieTaillard
Copy link
Member

@nicolaihenriksen Thank you for your contribution, it's really appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement release notes Items are likely to be highlighted in the release notes. visual breaking change Items here have affected the visual look of controls.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants