0
我試圖做一個CASE的選項質量,但我收到「==」的操作員錯誤什麼是這個問題的解決方案。選擇一個組合框項目XAML
這背後
private void myComboBoxThatICreatedInXaml_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (myComboBoxThatICreatedInXaml.SelectedValue.ToString == Low)
{
QualityChoices.Add(YouTubeQuality.QualityHigh);
case
(myComboBoxThatICreatedInXaml.SelectedValue.ToString == Medium)
{
QualityChoices.Add(YouTubeQuality.QualityMedium);
}
case
(myComboBoxThatICreatedInXaml.SelectedValue.ToString == High)
{
QualityChoices.Add(YouTubeQuality.QualityHigh);
}
}
的代碼,這是我的XAML代碼。
<ComboBox x:Name="myComboBoxThatICreatedInXaml" SelectionChanged="myComboBoxThatICreatedInXaml_SelectionChanged" >
<ComboBoxItem Tag="LW">Low</ComboBoxItem>
<ComboBoxItem Tag="MD">Medium</ComboBoxItem>
<ComboBoxItem Tag="HG">High</ComboBoxItem>
</ComboBox>
謝謝!它的工作現在! – Mikasuki