I have an array of button which is dynamically generated at run time. I have the function for button click in my code, but I can't find a way to set the button's click name in code. So,
what is the code equivalent for XAML:
<Button x:Name="btn1" Click="btn1_Click">
Or, what should I place for "????" in the following Code:
Button btn = new Button();
btn.Name = "btn1";
btn.???? = "btn1_Click";
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…