View Hierarchy
As shown in the architecture diagram:
The view elements are organized by the following container UI elements hierarchically:
Container | Description |
---|---|
DataView | The root of the view, contains scalar UI elements and other container elements. |
BlockView | Contains flowing RowView. This level is optional. |
RowView | Contains UI elements for one row of data. |
Unlike other UI elements which are explicitly created via data binding, BlockView and RowView elements are created implicitly. These container elements can be bridges between view and presenter. For example, RowView exposes a RowPresenter property.
Since presenting collection of data is extensively and exclusively supported by the presenter, all the complex controls (controls derived from System.Windows.Controls.ItemsControl
such as ListBox
or DataGrid
) are not necessary any more. By using RDO.WPF, your application only need to deal with simple controls such as TextBlock
or TextBox
, via data binding, in an unified way.
Here is an example of hierarchical view with BlockView:
Here is another example of hierarchical view with scalar elements and without BlockView:
You can run your application in debug mode and investigate the view hierarchy in Visual Studio Live Visual Tree tool window: