Skip to content

Replaced ShadowDepth with Elevation #2786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 19, 2022
Merged

Replaced ShadowDepth with Elevation #2786

merged 2 commits into from
Jul 19, 2022

Conversation

jizc
Copy link
Contributor

@jizc jizc commented Jul 16, 2022

Fixes #2774
Partially fixes #2407

This builds upon the changes made in #2765 and replaces ShadowDepth with Elevation as discussed in #2774. ShadowDepth is marked as obsolete, but still works, because setting it will also set an equivalent Elevation (this can be removed in a future version). I have replaced all uses of ShadowDepth in all styles and demos.

Some shadows are slightly different now, both because the Elevation values don't translate exactly to the old ShadowDepth values, but also because we now have more granularity and can get closer to the recommended values in the specs. I used https://material.io/design/environment/elevation.html#default-elevations and the individual component specs to find the recommended values for the new system.

As a "bonus" I added support for HorizontalContentAlignment and VerticalContentAlignment to the Card styles, as I needed it to simplify the elevation demo.

@Keboo Keboo added this to the 4.6.0 milestone Jul 19, 2022
@Keboo Keboo added enhancement release notes Items are likely to be highlighted in the release notes. labels Jul 19, 2022
@Keboo Keboo merged commit af0972f into MaterialDesignInXAML:master Jul 19, 2022
@jizc jizc deleted the feature/elevation branch July 19, 2022 13:25
@jizc jizc mentioned this pull request Jul 19, 2022
29 tasks
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace Obsolete ShadowDepth Elevation Support
2 participants