How to set ShadowDepth or Elevation for Popupbox in material design WPF? #3011
-
I have a material design Popupbox in my project, And I want to change its Shadow, but unfortunately I can't do it in every way I tried, do I have any chance to do this?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@VahidEra Based on your example, I assume you're talking about the ("default style") And if so, you are indeed correct that changing
is missing in this nested However, this does present an issue where I will need some input from @Keboo: The nested Regarding the |
Beta Was this translation helpful? Give feedback.
@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 defaultPopupBox
internally uses aCard
which hasElevationAssist.Elevation=Dp1
by default. I believe the value applied on thePopupBox
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…