C# MaterialDesign:从代码隐藏中访问和更改阴影深度
我可以使用以下xaml代码在materialDesign中创建卡:C# MaterialDesign:从代码隐藏中访问和更改阴影深度,c#,wpf,xaml,material-design-in-xaml,C#,Wpf,Xaml,Material Design In Xaml,我可以使用以下xaml代码在materialDesign中创建卡: <materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" x:Name="btnUserAdd"> </materialDesign:Card> 如何在下面的代码中将“ShadowDepth”更改为“Depth2”?与任何其他依赖项属性一样: btnUserAdd.SetValue(ShadowAssist.Shado
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" x:Name="btnUserAdd">
</materialDesign:Card>
如何在下面的代码中将“ShadowDepth”更改为“Depth2”?与任何其他依赖项属性一样:
btnUserAdd.SetValue(ShadowAssist.ShadowDepthProperty, ShadowDepth.Depth2);
或者因为它是:
ShadowAssist.SetShadowDepth(btnUserAdd, ShadowDepth.Depth2);