XamlReader with Click Event
问题 I am using XamlReader in my WPF project. And it works (My reference) My current sample Xaml is like that: <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Width="800" Height="600"> <Button Name="Test1" Content="Test1" Width="357" Height="88" Margin="14,417,0,0" ></Button> <Button Name="Test2" Content="Test2" Width="357" Height="88" Margin="14,529,0,0" ></Button> </Grid> and adding button's click event like this: button = LogicalTreeHelper.FindLogicalNode(rootObject,