how to trigger a button click in my code? [duplicate]
问题 This question already has answers here : Invoking the click method of a button programmatically (2 answers) Closed 6 years ago . How can I trigger a button click directly in my code? I have a code like this: namespace App1 { /// <summary> /// An empty page that can be used on its own or navigated to within a Frame. /// </summary> public sealed partial class MainPage : Page { public MainPage() { this.InitializeComponent(); } protected override void OnNavigatedTo(NavigationEventArgs e) { //