I'm trying to setup validation for some form fields and bind any errors to the UI elements provided by materialdesign-in-xaml.
The question is how can I use reactive's Bind method to set the required parameters (not sure if parameters is the correct wording here) for this to work.
I'm trying to do this:
<TextBox x:Name="NewTransactionPriceTextBox"
Margin="0,15,0,0"
materialDesign:HintAssist.Hint="Transaction Price"
HorizontalAlignment="Left"
Text="{Binding NewTransactionPrice, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" />
But in code behind, like this:
this.Bind(ViewModel, vm => vm.NewTransactionPrice,
v => v.NewTransactionPriceTextBox.Text).DisposeWith(sub);
How can I pass NotifyOnValidationError=True
and the rest using ReactiveUI Syntax?