コンボボックスをリセットして空にするには、 私は正しい例が1つありますが、もう1つは間違っています。コンボボックスをWPFでリセットするには
列挙リストへの2つのコンボボックスのバインド:
列挙ブランド:
パブリック列挙IdentificationDeviceBrand:int型 { FMC = 1、 DMM = 2、 HTC = 3 }
列挙型:
public enum IdentificationTypes : int { TerminalEntryGate = 1, TerminalExitGate = 2, LoadingAreaEntryGate = 3, LoadingAreaExitGate = 4, IslandEntryGate = 5, IslandExitGate = 6
}
Iは、コンボボックスのリセットを行った:タイプについて
XAML:
<ComboBox Name="comboBrand"
Validation.ErrorTemplate="{StaticResource TextBoxErrorTemplate}"
ItemsSource="{Binding BrandEnum}" SelectedItem="{Binding SelectedBrand, NotifyOnValidationError=True, TargetNullValue=''}"
SelectedValuePath="id" />
XAMLマークアップを投稿し、問題を再現できるサンプルを含めてください:https://stackoverflow.com/help/mcve – mm8