I am trying to create a custom effect by inheriting from Effect.
<Ellipse Width="75" Height="75" Stroke="LightGray">
<Ellipse.Effect>
<local:GlowEffect GlowRadius="10"/>
</Ellipse.Effect>
</Ellipse>
The problem is in my effect code. I have no way of getting the parent of the effect property, in this case, that ellipse. You cannot use VisualTreeHelper as the ellipse will not have been loaded in the visual tree when the GlowEffect is constructed (in its constructor). I have not found a way to get by this issue, or maybe I'm just going about this the wrong way.
All "Magic" is implemented in shader file (.fx extension), but not in C# Effect class. You have access to all pixels and their colors in shader, and you can combine colors of neighbour pixels as you wish.
I recommend you to read this book if you plan to create custom effects.
And answer to your question is - you not need to get access to Parent element.