title: Create a binding from a viewmodel collection class to a property in the datacontext
body: <p>I have a viewmodel with multiple counters which are used in serval methods.
  In the view model there is also a collection of class MenuItem which holds information the create the dynamic menuitems in the ribbon. On some of those menuitems i want to display the counter through a badge.</p>
  <p>But to do this i need the bind the badge to the counter property.
  In my menuitem class i have the path for the binding, but how can i thell my menuitem template to bind to the path it has in it's own binding.</p>
  <p><em>Examples are simplified</em></p>
  <pre><code>public class ViewmodelSample
  {
      public int counter1 { get; set; }
  
      public ICollection&lt;MenuItem&gt; MenuItems { get; set; } = new ObservableCollection&lt;MenuItem&gt;();
  
      public void Sample()
      {
          MenuItems.Add(new MenuItem()
          {
              Name = &quot;Test button&quot;,
              CounterPath = &quot;counter1&quot;
          });
      }
  
  
      public class MenuItem
      {
          public string Name { get; set; }
          public string CounterPath { get; set; }
      }
  }
  </code></pre>
  <pre><code>&lt;ItemsControl ItemsSource=&quot;{Binding Path=MenuItems}&quot; &gt;
      &lt;ItemsControl.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;StackPanel&gt;
                  &lt;TextBlock Text=&quot;{Binding Name}&quot;/&gt;
                  &lt;TextBlock Text=&quot;{Binding Path={Binding CounterPAth}}&quot;/&gt;
              &lt;/StackPanel&gt;
          &lt;/DataTemplate&gt;
      &lt;/ItemsControl.ItemTemplate&gt;
  &lt;/ItemsControl&gt;
  </code></pre>