In the Resources section of a ControlTemplate I try to use a setter in a DataTrigger to modify individual corner radii on a Border:
<Style x:Key="SectionBorder" TargetType="{x:Type Border}" >
<Setter Property="CornerRadius" Value="5" />
<Style.Triggers>
<DataTrigger Binding="{Binding HasChildSection, RelativeSource={RelativeSource TemplatedParent}}" Value="True">
<Setter Property="(Border.CornerRadius).(CornerRadius.BottomLeft)" Value="0" />
<Setter Property="(Border.CornerRadius).(CornerRadius.BottomRight)" Value="0" />
</DataTrigger>
</Style.Triggers>
</Style>
This generates the compiler error:
"Cannot resolve the Style Property 'BottomLeft)'. Verify that the owning type is the Style's TargetType, or use Class.Property syntax to specify the Property."
Is WPF getting confused because CornerRadius is both property name and type name? Or am I not using "Class.Property syntax" properly? If I just use "CornerRadius.BottomLeft" for Property, I get a XamlParseException at runtime, stating that Property cannot be set to null.