I have a silverlight page with a textblock and button on it. Like this:
<TextBlock x:Name="txbNote" Margin="50,50" Text="Hello"/>
<Button x:Name="btnCheck" Height="40" Click="btnCheck_Click" ClickMode="Press" Margin="50,50,50,50" Content="Check Service"/>
Here is the handler for the click event:
Private Sub btnCheck_Click(ByVal sender As Object, ByVal e As EventArgs) 'Handles btnCheck.Click txbNote.Text = "I Was Clicked" End Sub
It works... but... Why doesn't this work?
<Button x:Name="btnCheck" Height="40" Click="btnCheck_Click" ClickMode="Press" Margin="50,50,50,50" Content="Check Service"/>
<TextBlock x:Name="txbNote" Margin="50,50" Text="Hello"/>
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.