Professional UI Solutions
Site Map   /  Register

Elegant Ribbon

Commands and Controls Implementation

Context-Based Architecture for Controls

« prev |  index |  next »


Usually UI component libraries are designed in a way that similar control classes vary across context. For example, if you want to use a regular button on a form, you need to use the Button class, but for a button on a toolbar, you would have to use some other class (for example, ToolbarButton). That approach restricts you in terms of polymorphism and is not conceptually elegant.

Elegant Ribbon introduces a context-based architecture, where logic and appearance of a control depends on its context in a way that when the parent window changes, the control's look and behavior change too. This means that when using our framework, for example, you can always drag a combo box from the Ribbon to a form and back because in both cases the combo box is represented by the very same class (see figure below).

Context-sensitive combo box

Context-sensitive combo box