What's the best way to disable a DropShadowEffect, for example if you know you are running in a remote session?
I can think of setting the color to transparent, the blur radius to 0, or the opacity to zero, but not sure if there's any difference in these choices, or if there's a better solution.
Style triggers + RenderCapability Tiers is what you need. There are slightly more friendly ways return the render tier capabilities but the general idea is there. When using terminal services, or there's no render capability for hardware effects, you can remove the effect with a style trigger.
<Style>
<Style.Triggers>
<Trigger Property="Perf:RenderCapabilityWrapper.Tier" Value="0">
<Setter Property="Effect" Value="{x:Null}"/>
</Trigger>
<Trigger Property="Perf:RenderCapabilityWrapper.Tier" Value="1">
<Setter Property="Effect" Value="{StaticResource performanceShadow}"/>
</Trigger>
<Trigger Property="Perf:RenderCapabilityWrapper.Tier" Value="2">
<Setter Property="Effect" Value="{StaticResource qualityShadow}"/>
</Trigger>
</Style.Triggers>
</Style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With