title: Silverlight Button Click Event
body: <p>I have a silverlight page with a textblock and button on it. Like this:</p>
  
  <pre><code>&lt;TextBlock x:Name="txbNote" Margin="50,50" Text="Hello"/&gt;        
  &lt;Button x:Name="btnCheck" Height="40"  Click="btnCheck_Click" ClickMode="Press" Margin="50,50,50,50" Content="Check Service"/&gt;
  </code></pre>
  
  <p>Here is the handler for the click event:</p>
  
  <pre><code>Private Sub btnCheck_Click(ByVal sender As Object, ByVal e As EventArgs) 'Handles btnCheck.Click
    txbNote.Text = "I Was Clicked"
  End Sub
  </code></pre>
  
  <p>It works... but...
  Why doesn't this work?</p>
  
  <pre><code>&lt;Button x:Name="btnCheck" Height="40"  Click="btnCheck_Click" ClickMode="Press" Margin="50,50,50,50" Content="Check Service"/&gt;
  &lt;TextBlock x:Name="txbNote" Margin="50,50" Text="Hello"/&gt;        
  </code></pre>
  
  <p>The only change is the relative position of the textblock and button. The button's click event (and every other event I tried) just doesn't fire unless the textblock is before the button in the xaml.</p>