i'm having a form with 2 text boxes:
TotalLoginsTextBox
UploadsLoginsTextBox
i want to limit UploadsLoginsTextBox so the maximum input for the text will be the value of the TotalLoginsTextBox. i am also using a value converter so i try to bound the Maximum value:
this is the XAML:
<!-- Total Logins -->
<Label Margin="5">Total:</Label>
<TextBox Name="TotalLoginsTextBox" MinWidth="30" Text="{Binding Path=MaxLogins, Mode=TwoWay}" />
<!-- Uploads -->
<Label Margin="5">Uploads:</Label>
<TextBox Name="UploadsLoginsTextBox" MinWidth="30">
<TextBox.Text>
<Binding Path="MaxUp" Mode="TwoWay" NotifyOnValidationError="True">
<Binding.ValidationRules>
<Validators:MinMaxRangeValidatorRule Minimum="0" Maximum="{Binding Path=MaxLogins}" />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
the problem i am getting the following error:
A 'Binding' cannot be set on the 'Maximum' property of type 'MinMaxRangeValidatorRule'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.
what is the proper way to do the binding ?