I have combobox like this:
<ComboBox Name="ExpireAfterTimeComboBox" Margin="5" SelectedIndex="0">
<ComboBoxItem Content="15 minutes" Tag="15" />
<ComboBoxItem Content="30 minutes" Tag="30" />
<ComboBoxItem Content="1 hour" Tag="60" />
<ComboBoxItem Content="1 day" Tag="1440" />
</ComboBox>
How do I get Tag value in code?
writing something like ExpireAfterTimeComboBox.SelectedItem.Tag
doesn't work.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…