12、在XAML中定义处理程序
<Grid> <Button x:Name="btnTest" Width="120" Height="36" Content="Code In XAML" Click="btnTest_Click"/> <x:Code> <![CDATA[ private void btnTest_Click(object sender,RoutedEventArgs e) { this.Close(); } ]]> </x:Code> </Grid>
<Grid> <Button x:Name="btnTest" Width="120" Height="36" Content="Code In XAML" Click="btnTest_Click"/> <x:Code> <![CDATA[ private void btnTest_Click(object sender,RoutedEventArgs e) { this.Close(); } ]]> </x:Code> </Grid>
该博客仅作为记录笔记,转载随意