Pretzel
Pretzel

Reputation: 33

Can I embed a Xamarin.Forms ContentPage or ContentView into a Wpf Window for quickly working with UI?

I have a WPF App that is currently just a window with a backing viewmodel, the viewmodel has a VisualElement property from Xamarin.Forms, that property is set with a Xamarin.Forms ContentPage in a .Net Standard 2.0 library, that VisualElement is attempting to be displayed in a ContentPresenter however I just get a type name in my window (as expected). The ContentPage is the one i'll be working with, but rather than always building on the Hyper-V emulator, i'd prefer to just quickly see my changes to UI and functionality in a window on my desktop.

Is it possible to do this?

Upvotes: 0

Views: 362

Answers (1)

Jason
Jason

Reputation: 89082

Yes. Xamarin Forms Embedding allows you to do this.

Upvotes: 1

Related Questions