<window x:class= "Demo_window. Window2 "
Xmlns= "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x= "Http://schemas.microsoft.com/winfx/2006/xaml"
Xmlns:local= "Clr-namespace:demo_window"
Title= "Window2" height= "width=" 300 "
>
<grid x:name= "Grid_1" >
<grid x:name= "Grid_2" local:student.test= "ddd" >
<grid x:name= "Grid_3" >
<stackpanel x:name= "Sp_1" >
<!--button.click= "Button_Click" is the installation method, the current control installs the Button.Click event listener, and when the event is fired, the Button.Click event is called to handle-
<!--click= "Button_Click" is a CLR event with the Button1 control itself to subscribe to {Invoke the add accessor of a CLR event}-->
<button x:name= "Button1" width= "," height= "button.click=", "Button_Click", click= "Button_Click"/>
</StackPanel>
</Grid>
</Grid>
</Grid>
</Window>
Differences between CLR events and routed events when they are applied in XAML code