title: wpf,How to show index of Collection in bind?
body: <p>ListBox had been binded to a Collection of string,I want to Button control to show index of element in collection.</p>
  
  <pre><code>&lt;Style TargetType="ListBoxItem"&gt;
          &lt;Setter Property="Margin" Value="2"/&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate&gt;
                      &lt;Grid Background="{TemplateBinding Background}"&gt;
                          &lt;Border BorderThickness="1"&gt;
                              &lt;Button Height="20" Width="20" Content="{Binding ???}"  Margin="2"&gt;
                              &lt;/Button&gt;
                          &lt;/Border&gt;
                      &lt;/Grid&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
          &lt;/Style&gt;
  </code></pre>