ContentView<TViewModel>
A page bound to a typed ViewModel: bind with
Bind(...).- Kind: Class
- Namespace: SkeleKit
- Inherits:
ContentView
| Type parameter | Summary |
|---|---|
(class) TViewModel | The ViewModel type driving the page. |
Constructors
Stores the ViewModel, so the derived constructor composes its tree against it directly.
| Parameter | Summary |
|---|---|
TViewModel viewModel | The ViewModel driving this page. |
Properties
ViewModel
The ViewModel this page was built around. Bindings resolve against it.
Type: TViewModel
Methods
Bind
Starts a binding that can only write control values to the ViewModel.
Returns
ToSourceBindingBuilder<TViewModel>: A source-only binding builder.
Bind
Binds one way to a ViewModel property.
| Parameter | Summary |
|---|---|
Func<TViewModel, T> read | The ViewModel property to read. |
(optional) string? path | The source lambda, captured automatically to derive the property path. |
| Type parameter | Summary |
|---|---|
T | The bound value type. |
Returns
BindingExpression<TViewModel, TViewModel, T>: The binding expression.