Class OneWayBindingOnOneOrTwoWayBind<TViewModel, TViewProp, TOut>
Represents a one way View and ViewModel binding on a View Property that supports one or two way binding.
public class OneWayBindingOnOneOrTwoWayBind<TViewModel, TViewProp, TOut> : IOneOrTwoWayBind<TViewModel, TOut> where TViewModel : class
Type Parameters
TViewModel
The type for the ViewModel.
TViewProp
The type for the View.
TOut
The type for the conversion.
- Inheritance
-
OneWayBindingOnOneOrTwoWayBind<TViewModel, TViewProp, TOut>
- Implements
-
IOneOrTwoWayBind<TViewModel, TOut>
- Inherited Members
Constructors
OneWayBindingOnOneOrTwoWayBind(Expression<Func<TViewModel, TViewProp?>>, Expression<Func<TViewProp, TOut>>)
Initializes a new instance of the OneWayBindingOnOneOrTwoWayBind<TViewModel, TViewProp, TOut> class.
public OneWayBindingOnOneOrTwoWayBind(Expression<Func<TViewModel, TViewProp?>> viewModelBinding, Expression<Func<TViewProp, TOut>> converterBinding)
Parameters
viewModelBinding
Expression<Func<TViewModel, TViewProp>>View to ViewModel binding expression.
converterBinding
Expression<Func<TViewProp, TOut>>View Property Conversion binding expression.
Methods
ApplyBinding<TView>(Action<IDisposable>, TView, TViewModel, Expression<Func<TView, TOut>>)
Applies a View to View Model Binding.
public void ApplyBinding<TView>(Action<IDisposable> d, TView view, TViewModel viewModel, Expression<Func<TView, TOut>> viewBinding) where TView : class, IViewFor<TViewModel>
Parameters
d
Action<IDisposable>The disposable action registration. Used to clean up when bindings fall out of scope.
view
TViewThe instance of the View to bind.
viewModel
TViewModelThe instance of the ViewModel to Bind.
viewBinding
Expression<Func<TView, TOut>>Expression of the View Property to Bind to.
Type Parameters
TView
The type for the view.
ApplyBinding<TView>(CompositeDisposable, TView, TViewModel, Expression<Func<TView, TOut>>)
Applies a View to View Model Binding.
public void ApplyBinding<TView>(CompositeDisposable compositeDisposable, TView view, TViewModel viewModel, Expression<Func<TView, TOut>> viewBinding) where TView : class, IViewFor<TViewModel>
Parameters
compositeDisposable
CompositeDisposableThe disposable action registration. Used to clean up when bindings fall out of scope.
view
TViewThe instance of the View to bind.
viewModel
TViewModelThe instance of the ViewModel to Bind.
viewBinding
Expression<Func<TView, TOut>>Expression of the View Property to Bind to.
Type Parameters
TView
The type for the view.