Uno Platform - how to use UserControls from a different project?

512 views Asked by At

I am trying to reference a user control coming from a other project into my "Shared" project in Uno Platform.

How can I achieve this?

1

There are 1 answers

0
Jérôme Laban On BEST ANSWER

In order to do this, you'll need to create an "Uno Cross-Platform Library" using the Visual Studio extension, then create a user control there. There is no UI to create a UserControl in the 3.0 version of the templates, but this will change in Uno 3.1. You can create a Page and change the content to a UserControl instead.

Once you have created the control and built the project, you'll need to add a reference to that library to all the platform heads.

You can find a working sample of this here.