Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Binding ValidationRules in one line?

I have several one-line binding already written and I'd like to keep it that way if possible and if it still is humanly readable. Is there any way to rewrite this

<TextBox.Text>
    <Binding Path="SomePath" NotifyOnValidationError="True" >
        <Binding.ValidationRules>
            <local:ValidationRule1></local:ValidationRule1>
        </Binding.ValidationRules>
    </Binding>
</TextBox.Text>

in one line?, like

<TextBox Text="{Binding Path=SomePath, [ValidationRule1...]}" />
like image 364
user347594 Avatar asked Jul 14 '10 03:07

user347594


1 Answers

I think there is no one-liner and besides the standard version is more readable.

like image 148
user347594 Avatar answered Sep 20 '22 17:09

user347594