Uno Controls allows you to choose parameters, and create the XAML code for a control directly in your XAML. Currently we support the following controls:-
Simply right-click in your XAML file, and select your control from the 'Insert Uno Controls' menu. This extension should be of use to experienced users, and especially for beginners to help understand how the controls are built.
Select the control you want to generate and a 'selection box' appears, allowing you to choose properties for your control. In this case we have chosen 'TextBlock'.
If you are using a 'style' for your TextBlock, you can enter it in the 'style' box, and if you have a binding context, again, enter it into the box, and it will replace the 'text' entry in the code.
The parameters persist between sessions, but if you right click on the 'group box' containing all the controls, you can go back to the default parameters.
If you select 'Control in Grid', 3 more fields appear, allowing you to select a row, column and column span, to place your control in a grid. This is available in all the controls, except the grid control.
If we change the name above to tblWelcome, and leave all the other parameters as they are, click on OK, the following code is inserted your XAML:-
Which generates this on your form:-
Click on the Help button to be taken to the reference page of the control you are working on.
You have the option to 'create an event' for some controls, such as Button and ComboBox.
When the XAML is generated, the appropriate event is created. You still have to add the event in the code behind. At the end of the properties for the control, the code is generated, and commented out. Simply copy or cut the code, and then paste it into your code behind file.
You can see a video of the add-in in action here.
Any questions or problems - please email email@example.com
This add-in needs VS2019 Release 16.9 and above