Hello,
I want to define a shadow for a border in styles so I can adjust it for light and dark mode.
You can define a shadow for a border, then change the shadow's property for the light mode and dark mode.
For example, Please open Styles.xaml
, then find the <Style TargetType="Border">
, add a Shadow like following code. I define different colors of Brush and values of Opacity for different themes.
<Style TargetType="Border">
...
<Setter Property="Shadow">
<Shadow
Brush="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Magenta}}"
Opacity="{AppThemeBinding Light=1, Dark=0.5}"
Radius="50"
/>
</Setter>
</Style>
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.