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
TViewModelThe type for the ViewModel.
TViewPropThe type for the View.
TOutThe 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
viewModelBindingExpression<Func<TViewModel, TViewProp>>View to ViewModel binding expression.
converterBindingExpression<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
dAction<IDisposable>The disposable action registration. Used to clean up when bindings fall out of scope.
viewTViewThe instance of the View to bind.
viewModelTViewModelThe instance of the ViewModel to Bind.
viewBindingExpression<Func<TView, TOut>>Expression of the View Property to Bind to.
Type Parameters
TViewThe 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
compositeDisposableCompositeDisposableThe disposable action registration. Used to clean up when bindings fall out of scope.
viewTViewThe instance of the View to bind.
viewModelTViewModelThe instance of the ViewModel to Bind.
viewBindingExpression<Func<TView, TOut>>Expression of the View Property to Bind to.
Type Parameters
TViewThe type for the view.