日期:2014-05-16 浏览次数:20832 次
<Grid>
<Button Name="button1" Content="Button" HorizontalAlignment="Left" Margin="130,103,0,0" VerticalAlignment="Top" Width="175" Click="Button_Click"/>
<Button Name="button2" Content="Button" HorizontalAlignment="Left" Margin="130,166,0,0" VerticalAlignment="Top" Width="{Binding ElementName=button1, Path=Width}"/>
</Grid>
private void Button_Click(object sender, RoutedEventArgs e)
{
(sender as Button).Width = 200;
}