I'm using ReactiveUI for Winforms 6.5. I'm trying to bind dynamically created textbox to a ViewModel property. Bind method doesnt allow to create such a binding.Is there any way to create binding in runtime?
Asked
Active
Viewed 319 times
1 Answers
1
If you need one-way binding (view model to view) only, you can use BindTo method:
TextBox textBox = new TextBox();
ViewModel.WhenAnyValue(model => model.PropertyToBind)
.BindTo(textBox, t => t.Text);

ds-b
- 361
- 1
- 5