Can DropShadowEffect ignore certain colors when rendering a shadow? To have a hidden (color) shadow?
My problem is that the shadow can be assigned to the entire visual element (graph). It looks like this:

I want too

Pay attention to the grid lines without a shadow (except 0,0 ). This can be achieved with 2 synchronized scaling / displacement graphs, one with no shadow effect containing a grid and the other with a shadow containing the rest. But I am not very happy with this solution (I predict many problems in the future with this solution). Therefore, I would rather change DropShadowEffect .
I can create and use ShaderEffect , but I don’t know how to program shaders to have a real shadow effect (if it can be created by shaders at all).
Perhaps there is a much simpler way to do something with DropShadowEffect itself? Is anyone
Edit
I tried to make a shader effect:
sampler2D _input : register(s0); float _width : register(C0); float _height : register(C1); float _depth : register(C2); // shadow depth float4 main(float2 uv : TEXCOORD) : COLOR { // get pixel size float2 pixel = {1 / _width, 1 / _height}; // find color at offset float2 offset = float2(uv.x - pixel.x * _depth, uv.y - pixel.y * _depth); float4 color = tex2D(_input, offset); // convert to gray? //float gray = dot(color, float4(0.1, 0.1, 0.1, 0)); //color = float4(gray, gray, gray, 1); // saturate? //color = saturate(color); return tex2D(_input, uv) + color; }
But not all.
Edit
Here is a screenshot of the appearance of the graph that I like (for those who are trying to convince me not to do this):

Currently, this is achieved using a special Graph that has a template.
<Border x:Name="PART_Border" BorderThickness="1" BorderBrush="Gray" CornerRadius="4" Background="White"> <Grid> <Image x:Name="PART_ImageBack" Stretch="None"/> <Image x:Name="PART_ImageFront" Stretch="None"> <Image.Effect> <DropShadowEffect Opacity="0.3"/> </Image.Effect> </Image> </Grid> </Border>
Everything is displayed on PART_ImageFront (with shadow), and the grid is displayed on PART_ImageBack (without shadow). In terms of performance, it's still good.