Headlined View Model
Overview
HeadlinedViewModel is a view model that extends ViewModel and implements IHeadlinedViewModel, adding properties for displaying a title (header), icon, and description. It is designed for view models such as menus, tabs, toolbars, or any other components that require a headline with an icon.
Common Use Cases
Menu Items
Example of an item view model for a menu:
HeadlinedViewModel already overrides GetChildren() to return an empty sequence, so a leaf item like this does not need to override it — do so only when your view model has child view models.
API
HeadlinedViewModel
Represents a base view model with a title (header) and an optional icon. This can be used as a foundation for view models that require a title and icon representation.
HeadlinedViewModel constructor
Constructor | Description |
|---|---|
| Passes the type identifier to the base |
Property | Type | Description |
|---|---|---|
|
| Gets or sets the icon associated with the view model. |
|
| Gets or sets the palette color kind of the icon. |
|
| Gets or sets the item visibility. |
|
| Gets or sets the header (title) of the view model. |
|
| Gets or sets the description of the view model. |
|
| Gets or sets the order of the view model. |
Method | Return Type | Description |
|---|---|---|
|
| Override. Returns an empty sequence, since a headlined view model has no children. |