New App Design Considerations Part 5 - Subclassing or Modifier Classes

I’m looking at using Cards as containers added to a CSSGridItem to show a menu. Each Card would be the same. These Cards would have child controls within them (button). If all of the cards are the same layout, I’d like to subclass (visual studio terms) the Card control to have all the children and my needed properties set. It seems to me that using subclasses would paint faster and be easier to maintain.

In the it mentions Modifier Classes for Cards. Is this how one would create a subclass? I couldn’t find any references to Modifier Classes.

Class in this context has a different meaning. Every HTML element has a class attribute, which can contain one or more strings which are the names of classes which apply to the element.

A class is defined as some css: a list of style attributes to apply to the element.

However, it is true that you could use classes to help you in this instance. Since each of the cards will have the same style settings, put the style settings in to classes in your Project CSS.

There is more here:

My usage of CLASS may have been misleading. I’ve been in mainframe and desktop (visual studio) for over 55 years and just now starting in mobile/web apps.

But I think you’re suggestion to learn CSS is the way to go for the type of customization I’m looking for, which is mainly UI property settings.

However, I can see a time when I want to make a control from a set of other controls and code which I can insert into a form or container at design time, or at least at run time. How would one do this?

If you want to make it look and act like a regular control, create a Toolbox File for it:

It will then appear in the Toolbox with the rest of the controls.