こんにちは、みなさん。Silverlightを初めて使用し、ListBoxItemの一部であるボタンコントロールにアクセスしたいと思います。ただし、これを行う方法はよくわかりません。私のXAMLは次のとおりです。
<DataTemplate x:Key="ItemTemplate2">
<Grid Height="51">
<TextBlock x:Name="tbName" Text="{Binding Property1}" Margin="0,0,98,0" d:LayoutOverrides="Height" Grid.ColumnSpan="2" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<Button x:Name="btnInfo" HorizontalAlignment="Right" Margin="0,-11,0,0" Width="87" Height="54" VerticalAlignment="Top" Background="#FF8EC1D2" BorderBrush="#FF8EC1D2" BorderThickness="0">
<Image Source="../Images/btnNameImage.png" Stretch="None"/>
</Button>
</Grid>
</DataTemplate>
コードビハインドから「btnInfo」にアクセスするにはどうすればよいですか?
助けてくれてありがとう