关于WPF绑定的问题
以下代码红色字体的地方我想绑定成button按钮的Name属性,应该怎么写?我是在资源文件里面的样式,大虾们请指点下!
<Style x:Key="buttonStyleByTemplate" TargetType="{x:Type Button}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <ControlTemplate.Triggers> <EventTrigger RoutedEvent="MouseEnter"> <BeginStoryboard> <Storyboard RepeatBehavior="Forever" AutoReverse="True"> <DoubleAnimation Storyboard.TargetName="{Binding Button,Path=Name}" Storyboard.TargetProperty="Button.Width" From="50" By="10" Duration="0:0:1"/> </Storyboard> </BeginStoryboard> </EventTrigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style>