Custom Fill Property on PathGeometry in Silverlight
- by Otaku
I've been looking at (and getting confused by) Dependency Properties - I'm not sure if this is what I need or if there is something else.
I'm looking to something very specific with <Path.Data/> children in Silverlight, in particular <PathGeometry/>, <EllipseGeometry/>, etc. While the <Path/> element has a .Fill property, I'd like to add a .Fill property to any of it's Geometries, meaning it's a different color from it's parent. It could be a <SolidColorBrush/> or <LinearGradientBrush/> color, or a percentage of the parent color (like 20% darker than <Path.Fill/>.
Is this possible? Is this a dependency property? How would <RectangleGeometry/>, for example, know that I am trying to fill it with a color? How would I get started?
(adding WPF as a tag too as someone who knows WPF may be able to help)