Can a HTML/WinJS View use a user control built in XAML/C#?

388 views Asked by At

I am hesitant to develop a Windows Phone app in the HTML/WinJS Universal App space because of the difficulty of building complex user controls. Before I go the XAML/C# route, I would like to find out if it is possible to use a user control built in XAML/C# inside of an HTML/WinJS view?

My initial feeling is that it is not possible due to XAML parsing not being available in the HTML space, but I am not certain that this is the case. Any thoughts?

Also, I am not interested in 3rd party solutions such as Xamerin. I am really trying to see if this is possible from a native approach.

1

There are 1 answers

1
Rob Caplan - MSFT On BEST ANSWER

No. The HTML and Xaml UI stacks in the Windows Runtime are separate and cannot be mixed. You can call non-UI C# or native Windows Runtime Components from JavaScript.

You can include HTML in a Xaml WebView, but there is no reverse hosting.

--Rob