<Rectangle Name="rect" Fill="Red" HorizontalAlignment="Stretch" Height="50">
<Rectangle.Triggers>
<EventTrigger RoutedEvent="Rectangle.MouseDown">
<BeginStoryboard>
<Storyboard>
<BooleanAnimationUsingKeyFrames Storyboard.TargetName="TreeView" Storyboard.TargetProperty="(SelectedItem).(IsExpanded)">
<DiscreteBooleanKeyFrame KeyTime="00:00:1" Value="True" ></DiscreteBooleanKeyFrame>
</BooleanAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Rectangle.Triggers>
</Rectangle>
<TreeView Name="TreeView">
<TreeViewItem>hello</TreeViewItem>
<TreeViewItem>world</TreeViewItem>
</TreeView>
这是我尝试扩展单击矩形的方式,给出有关属性名称错误的错误。绝对是我不知道的属性命名约定。请帮我找出正确的命名约定,以及代码中是否还有其他问题。