This is syntax for specifying a Type qualified DependencyProperty
. It is required, because the Storyboard.TargetProperty
attached property can be attached to any DependencyObject
. That means the XAML parser won't know how to resolve the properties unless they are fully qualified.
This syntax is also used for things like binding to attached properties. Here is a contrived example to demonstrate this:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border x:Name="Foo" Background="Blue" Grid.Row="10" />
<Border x:Name="Bar" Background="Red" Height="{Binding (Grid.Row), ElementName=Foo}" />
</Grid>
If you remove the parenthesis from the Binding
, you'll get a binding error (because there is no Grid property on the Border
element).