Making custom Views

One of the most important features of ardUI is extensibility. You are never limited by the set of widget ardUI provides out of the box because you can always implement your own widgets to suit all needs of your projects.

To start creating your custom widgets, you have to understand how ardUI draws widgets and what they consist of. Let's start with the View dimensions:

View geometry diagram

As you can see, any View has a view area where the actual content of the View might be drawn and a padding area around it. Optionally a View can also have a border around its padding (i.e. ButtonView). The most important thing here is that when creating your custom widgets, you may not draw outside the view area unless you have a good reason to do so (like drawing the border itself) and you should absolutely never draw anything outside the View border. This simple principle ("Don't draw on anything that's not yours") is true not just for ardUI but for any other UI frameworks/libraries as well.

On this page