Hello, is it possible to use validation without the Binding part? The thing is my textbox is not bound to any object, but I still want to validate it's content. The only way I've found so far is this:
<TextBox Grid.Row="0" Grid.Column="1" MaxLength="50" x:Name="textBoxTubeName" Margin="5,5,0,5">
<TextBox.Text>
<Binding Path="Name" UpdateSourceTrigger="PropertyChanged" Mode="TwoWay" NotifyOnValidationError="True">
<Binding.ValidationRules>
<validation:InvalidCharactersRule />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
But again, it only works when the TextBox.Text is bound to something (in this case, the Name property), how would I go about this without binding?
Thanks!