basically i have 2 ComboBoxes and i want to isEnabled="false"
my secound ComboBoxe2
as long as my first ComboBoxe1.Selecteditem == null
so i created the following DataTrigger
<ComboBox Name="CB1"
DisplayMemberPath="NameL"
IsEnabled="{Binding isNew}"
SelectedItem="{Binding selectedSpTyp}"
ItemsSource="{Binding SpTypList}"/>
<ComboBox Name="CB2"
DisplayMemberPath="NameD"
SelectedItem="{Binding selectedDesginvorlage}"
ItemsSource="{Binding DesginvorlageList}">
<ComboBox.Style>
<Style>
<Setter Property="UIElement.IsEnabled" Value="True"/>
<Style.Triggers>
<DataTrigger Binding="{Binding CB1.SelectedItem, UpdateSourceTrigger=PropertyChanged}" Value="{x:Null}">
<Setter Property="UIElement.IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
</Style>
</ComboBox.Style>
</ComboBox>