<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<StackPanel>
<TextBlock x:Name="name" Text="還沒點擊按鈕" HorizontalAlignment="Stretch" Height="Auto" FontSize="45" TextWrapping="Wrap"/>
<Button Name="button" Content="點擊這個按鈕" FontSize="35" Click="button_Click"/>
</StackPanel>
</Grid>
private void button_Click(object sender, RoutedEventArgs e)
{
this.name.Text = "你點擊了按鈕";
}