A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
Hello,
After testing, this can be implemented in MAUI, you can refer to the steps below.
In WPF part:
Step 1.Add the Startup event to the App.xaml of your WPF program to receive parameters.
//in xaml
<Application
...
Startup="Application_Startup">
// in code-behind
private void Application_Startup(object sender, StartupEventArgs e)
{
foreach (var item in e.Args)
{
//Operate on incoming parameters
}
}
Step 2. Implement the ability to start WPF programs via ProcessStartInfo in MAUI.
private void StartWPFApp(object sender, EventArgs e)
{
var path = "C:\\wpf1_test\\WpfApp1.exe"; //WPF program path
if (File.Exists(path))
{
ProcessStartInfo startInfo = new ProcessStartInfo(path, "hello world")
{
CreateNoWindow = true,
UseShellExecute = true,
};
Process.Start(startInfo);
}
}
Best Regards,
Alec Liu.
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.