Skip to content

Customizing Design Surfaces

Simon Mourier edited this page Feb 19, 2020 · 1 revision

By default, a CodeModeler project contains one design surface that contains all types in the project, but you can create other surfaces to reduce the number of displayed types or focus on specific groups of types.

To create a new design surface, use the Surfaces folder node context menu and click on “Add New Surface”. You will be presented with a dialog box like this:

Customizing Design Surfaces - Picture 18

The surface must be given a name, and it must be stored physically in a CodeModeler part. We recommend you use the default part path that’s proposed once you’ve defined a name. The rest of the dialog box controls corresponds to the design surface “selectors”, detailed hereafter:

Include all mode concepts is used when you want to start from a full selection and add exclusions. If you only need inclusion, you won’t need to check this box.

Include concepts namespaces (or Exclude concepts namespaces) will open this child dialog box:

Customizing Design Surfaces - Picture 40

It displays all namespaces in the project. You can check what namespace you want to include (or exclude) in selection. It means all types in that namespaces will be selected (or excluded) in the design surface. And this is an example resulting surface with only the “CarRental.Inventory” namespace selected:

Customizing Design Surfaces - Picture 47

Include concepts (or Exclude concepts) will open this child dialog box:

Customizing Design Surfaces - Picture 41

It displays all types (entities, enumerations) in the project. You can check what types you want to include (or exclude) in selection, one by one.

Include concept categories will open this child dialog box:

Customizing Design Surfaces - Picture 42

It displays the project defined categories. Categories are a way of grouping concepts, programmatically or visually in Visual Studio. You can check what categories you want to include (or exclude) in selection.

Custom M3 queries allows you to enter queries to select concepts in the design surface. Check the Dynamic Modeling chapter for more on this. You can add multiple queries, each one with a unique name. For example, here is a custom selector /*[@NodeType='Enumeration'] that will select all enumerations in the project, from all namespaces:

Customizing Design Surfaces - Picture 44

And this is an example resulting surface:

Customizing Design Surfaces - Picture 46

Rendering

Surface rendering can be configured using the Surfaces folder node context menu, “Surface Rendering Configuration” menu item. The configuration is a set of properties that you can configure. CodeModeler defines 3 base presets (Modern, Classic, Blend) but you can create your own. The following image shows the “Classic” preset, and the properties that you can configure:

Rendering - Picture 48

You can also override the default rendering and configure each shape (entity, enumeration, namespace, note) independently, using the Visual Studio Property Grid, with the corresponding concept selected. Here we have applied a background gradient brush on the Branch entity only:

Rendering - Picture 49

Or a namespace with a background image:

Rendering - Picture 50

Clone this wiki locally