Is there a way to take this multibinding:
<TextBox.IsEnabled>
<MultiBinding Converter="{StaticResource LogicConverter}">
<Binding ElementName="prog0_used" Path="IsEnabled" />
<Binding ElementName="prog0_used" Path="IsChecked" />
</MultiBinding>
</TextBox.IsEnabled>
and put is all on one line, as in <TextBox IsEnabled="" />
?
If so, where can I learn the rules of this formattiong?
This can be done with a custom markup extension:
Usage:
A better (and simpler) approach would be to define a style as a resource which you can easily apply to any TextBox:
I tried using Discord's answer, but it didn't work right out of the box. To make it work I added a new constructor:
Usage will then be like this:
For MultiBinding there is no shorthand string. You need to use the expanded element syntax.