給定兩個簡單的組合框,我可以下拉並選擇項目,但第二個ddl拒絕顯示其值,而不是下降!任何幫助將不勝感激。在這一點上,沒有任何綁定的事件或數據就像這裏看到的一樣。Silverlight組合框選定的值隱藏
<ComboBox Height="23" Name="ddlRCC" Width="120" Margin="3,3,474,134">
<ComboBoxItem Content="RaC1" />
<ComboBoxItem Content="RaC2" />
<ComboBoxItem Content="RaC3" />
<ComboBoxItem Content="RaC4" />
<ComboBoxItem Content="RaC5" />
<ComboBoxItem Content="RaC6" />
</ComboBox>
<ComboBox Height="23" Margin="130,5,314,135" Name="ddlNOSC" Width="156" Padding="140,3,25,2">
<ComboBoxItem Content="NiSC1" />
<ComboBoxItem Content="NiSC2" />
<ComboBoxItem Content="NiSC3" />
<ComboBoxItem Content="NiSC4" />
</ComboBox>
可能填充值會導致任何奇怪的行爲? –
這不能,我敢打賭,你有一行代碼,你在哪裏設置你選擇的索引。我已將代碼複製到我的項目中,並且沒有顯示標準的選定索引。這是因爲當您將itemssource設置爲某些內容時,組合框的工作方式。您必須手動將selectedindex設置爲具有標準選擇的任何內容。 –