So I am trying to launch a Xamarin Application for a preview in a UserControl.
The reason for this is, that we have an application where we have a own description language to define custom scenes on our product and we need some kind of preview where the user can see the current scene. This scene will be send to different client types this includes a Xamarin Android App.
What I have tried was to use Xamarin.Forms.Platform.WPF, which worked perfectly, until I wanted to make it into a UserControl. The documentation says to use the tag:
<FormsApplicationPage>
And start the application like:
using Xamarin.Forms;
using Xamarin.Forms.Platform.WPF;
namespace BoxViewClock.WPF
{
public partial class MainWindow : FormsApplicationPage
{
public MainWindow()
{
InitializeComponent();
Forms.Init();
LoadApplication(new TestApp.App());
}
}
}
The problem is, that the class is a WPF Window, which is problematic for us, because we want it to integrate it into our existing WPF Application in the same Window.
The second Problem is, when you execute LoadApplication(new TestApp.App()); the whole window will get overridden.
So is there any way to use a Xamarin App with Xamarin.Forms.Platform.WPF as a UserControl?