silverlight custom control combo box binding
here two comboboxes in a user control:
<ComboBox Name="comboAmagat"
ItemsSource="{Binding Path=Screen.TotsElsElementsDeCosts, Mode=TwoWay}"
SelectedItem="{Binding Path=Value, Mode=TwoWay}"
></ComboBox>
<ComboBox Name="comboAmagat2"
ItemsSource="{Binding Path=Screen.TotsElsElementsDeCosts, Mode=TwoWay}"
SelectedItem="{Binding Path=Screen.TCon开发者_如何学JAVAversio_Aplicacions_ElementsDeCosts.SelectedItem.dimElementDeCost, Mode=TwoWay}" >
</ComboBox>
When screen is showed combo don't has a the selected item value. Selected Item is missing until:
- For comboAmagat2: user change row
- For comboAmagat: user change to a row with a different "dimElementDeCost" that first row.
What is wrong?
精彩评论