Subj.
I am using Silverlight 4 with VS2010, here is a source code:
<ComboBox Grid.Row="4" Grid.Column="1" Name="Player2All" MinWidth="50" ItemsSource="{Binding PlayersAll}" SelectionChanged="Player2All_SelectionChanged">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding ShortName}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
Here is code behind function:
private void Player2All_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.ShowDialog();
string strPlayerSelected = sender.ToString();
DebugTextBlock.Text = "hoho";
}
This function is not called when I change selected item... Why? How can I get that workable?
many thanks for any help.
P.S. Created a separate application... similar code works fine.