Skip to content

How to set ShadowDepth or Elevation for Popupbox in material design WPF? #3011

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

You must be logged in to vote

@VahidEra Based on your example, I assume you're talking about the ("default style") PopupBox similar to this one from the demo application?

And if so, you are indeed correct that changing ElevationAssist.Elevation has no effect. I believe this is a bug and something that should be fixed. The reason it happens is quite straight-forward actually. The default PopupBox internally uses a Card which has ElevationAssist.Elevation=Dp1 by default. I believe the value applied on the PopupBox should be applied to the internal card as well. So basically this line:

wpf:ElevationAssist.Elevation="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:ElevationAssist.Elevation)}"

is missi…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@VahidEra
Comment options

@Keboo
Comment options

Answer selected by Keboo
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