<ComboBox Grid.Row="1" Grid.Column="0" Width="Auto" Name="cmbBudgetYear">
<ComboBoxItem Content="2009" />
<ComboBoxItem Content="2010" />
<ComboBoxItem Content="2011" />
<ComboBoxItem Content="2012" />
</ComboBox>
如何在后台代码中将所选项目设置为当前年份?
就像..。
cmbBudgetYear.SelectedItem = cmbBudgetYear.Items(
get the item with the Now.Year.ToString)
https://stackoverflow.com/questions/3391195
复制相似问题