Creating and using a Control Model
Same as you have controls from the migrated code, you can add controls of your own.
In order to do that you need to:
- Go to the Base/Views/Controls folder
- Right click / add new item and choose the BaseControl template
- Specify a name - for example ExitButton*
- The class will be opened in the designer. Press F7 to go to the code
- Note the type from which your class inherits from - by default it is TextBox - you can change it any control from the Shared.Theme.Controls namespace. In our sample choose Button
- Setting its properties is done from the designer - so open it (double click on the class) and press F4.
In our sample you can change the Format to display Exit and handle its Click event to raise the Command.Exit
- Build the Base project and then the startup project
- Now if you will choose the Add controls to toolbox option and select the Base dll again, you will see the newly added control
Help us improve, Edit this page on GitHub
or email us at firstname.lastname@example.org