title: Binding to an MVVM Light relay command inside of a Windows Phone 7 item data template
body: <p>I'm attempting to bind a button to a viewmodel command using MVVM Light commands, and for some reason the command doesn't seem to be getting called. Normally I don't have any issues using commands, but this one seems to be ignoring the binding. </p>
  
  <p>Here's my code:</p>
  
  <pre><code>&lt;ListBox.ItemTemplate&gt;
      &lt;DataTemplate&gt;
          &lt;StackPanel&gt;
              &lt;Button&gt;
                  &lt;Interactivity:Interaction.Triggers&gt;
                      &lt;Interactivity:EventTrigger EventName="Click"&gt;
                          &lt;Command:EventToCommand 
                              Command="{Binding MyButtonClickAction}" /&gt;
                      &lt;/Interactivity:EventTrigger&gt;
                  &lt;/Interactivity:Interaction.Triggers&gt;
              &lt;/Button&gt;
  
              &lt;StackPanel&gt;
                  &lt;TextBlock Text="{Binding MyProperty}"/&gt;
                  &lt;StackPanel Orientation="Horizontal"&gt;
                      &lt;TextBlock Text="{Binding MyOtherProperty}" /&gt;
                  &lt;/StackPanel&gt;
              &lt;/StackPanel&gt;
          &lt;/StackPanel&gt;
      &lt;/DataTemplate&gt;
  &lt;/ListBox.ItemTemplate&gt;
  </code></pre>
  
  <p>This data template is in a list that gets created after my app launches, and I'm wondering if that's the problem. My theory is that the view model is created and the constructor attempts to set up the binding with the relay command, but since the list doesn't have any items yet, the binding fails somehow. </p>
  
  <p>The bindings to MyProperty and MyOtherProperty work fine.</p>
  
  <p>Any suggestions as to how I might get this working?</p>