I have a custom UserControl with a custom DependencyProperty. To paint a better picture of how I'm using this, the UserControl is the left navigation indicator in a wizard-like control. The left nav control exists inside of each of the controls that represent a step in the wizard. Inside of the left nav control, I am toggling visibility and setting visual properties of several child controls with a few converters with code similar to the following. I can't use a simple style selector or style-selecting converter because the entire structure of each row in my StackPanel is different if the item is selected or not.
This is a ton of code to be repeating all over my control to bind to a single custom property. Is there a shorter form version of the following or a cleaner way to implement this?
<Polygon
Visibility="{Binding
RelativeSource={RelativeSource Mode=FindAncestor,
AncestorType=UserControl},
Path=Selected,
Converter={StaticResource myCustomConverter},
ConverterParameter='Expected String'}">
...
The parent views supply a single property to customize the child control:
<!-- Left Column -->
<views:LeftNavControl Selected="Item to Select..." />