Hello,
Welcome to Microsoft Q&A!
when I click on the second button it won't show anything at all in the form.
During checked your code, I found you have not initialized UWPApplication.App in Winform Main method. Please replace the contents of Program.cs with the following
[System.STAThreadAttribute()]
static void Main()
{
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
using (new UWPApplication.App())
{
}
Application.Run(new Form1());
}
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.