initially I had a window with lots of bindings like this one:
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Path=DatabaseServer}" />
Now I have to add validation to each binding and I end with:
<TextBox Grid.Row="3" Grid.Column="1" >
<TextBox.Text>
<Binding Path="DatabaseServer" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<Utils:NotEmptyStringValidator />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
Can this be written with less text? Otherwise I will end with a hard to maintain window.
From the Binding Markup Extesnions page on MSDN:
So, no, there is not a more concise markup.
Unless you want to write your own markup extension?