title: WPF influencing the order of databinding?
body: <p>I have created an AttachedProperty that has a PropertyChangedCallback function, which does some formatting to a TextBlock. But to perform the formatting, the Tag attribute is needed. The Tag itself is bound to the output of a Multiconverter.</p>
  
  <p>But my problem is, that the FNamePropertChangedCallback is executed before the Tag is bound to the output of the Multibinding. Thus Tag still Null, when FNamePropertyChangedCallback is triggered.</p>
  
  <p>Is there any way to influence the order in which the Attributes are bound?
  I need to bind Tag before binding FInlineProperty.</p>
  
  <pre><code>public static readonly DependencyProperty FInlinePropertyProperty =
      DependencyProperty.RegisterAttached("FInlineProperty", typeof(string), typeof(MainWindow),
        new PropertyMetadata(null, FNamePropertyChangedCallback));
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;TextBlock local:MainWindow.FInlineProperty="{Binding Name}" TextWrapping="WrapWithOverflow"&gt;
    &lt;TextBlock.Tag&gt;
    &lt;MultiBinding Converter="{StaticResource TupleConverter}"&gt;
        &lt;Binding /&gt;
        &lt;Binding ElementName="Window"/&gt;
      &lt;/MultiBinding&gt;
    &lt;/TextBlock.Tag&gt;
  &lt;/TextBlock&gt;
  </code></pre>
  
  <p>Btw: Does someone know how to write <code>local:MainWindow.FInlineProperty="{Binding Name}</code>" in long form? I tried <code>&lt;TextBlock.local:MainWindow.FInlinse&gt;...&lt;/TextBlock.local:MainWindow.FInlinse&gt;</code>, but the compiler complains about it.</p>
  
  <hr>
  
  <p>Update 25.Feb.2017:</p>
  
  <p>I did what you suggested and bound everything to my Attached Property.</p>
  
  <pre><code>&lt;TextBlock TextWrapping="WrapWithOverflow" &gt;
  &lt;local:MainWindow.FInlineProperty&gt;
    &lt;MultiBinding Converter="{StaticResource GroupConverter}"&gt;
      &lt;Binding  /&gt;
      &lt;Binding ElementName="Window" Path="MySetup" /&gt;
    &lt;/MultiBinding&gt;    
  &lt;/local:MainWindow.FInlineProperty&gt;
  &lt;/TextBlock&gt;
  </code></pre>
  
  <p>The problem with this is, that it is working the first time when the ListBoxItem is created. But updating properties from MySetup does not re-trigger FNamePropertyChangedCallback. </p>
  
  <pre><code>  MySetup.ColorString = "green";  // this does not retrigger the callback
    MySetup = MySetup.Copy();       // this does retrigger the callback
  </code></pre>
  
  <p>So currently only assigning MySetup a new copy of itself (changing the reference) triggers callback function again.</p>
  
  <p>That was the reason, why I bound the name property explicitly.</p>
  
  <p>MySetup.ColorString would trigger, if I bind to it explicitly, but I need to bind to MySetup to have all data, so the question is, how to force the binding to execute again, when the bound object itself (reference) has not changed, but something inside did change?</p>