K.K.D.
K.K.D.

Reputation: 65

Adding MultiBinding and Binding to Resources collection

Why is it not possible?

I use the same binding in a lot of places and I hate to copy and paste the same xaml instead of use it as a resource...

any way to to this?

thanks!

Upvotes: 2

Views: 1081

Answers (1)

Aaron McIver
Aaron McIver

Reputation: 24723

Define your bindings within a style which can reside as a resource.

<Style x:Key="MyStyle">
  <Setter Property="Background">
    <Setter.Value>
      <MultiBinding
        Converter="{StaticResource MyConverter}" >
        <MultiBinding.Bindings>
          <Binding.../>
          <Binding.../>
        </MultiBinding.Bindings>
     </MultiBinding>
   </Setter.Value>
  </Setter>
</Style>

Upvotes: 1

Related Questions