Я хочу изменить BorderBru sh моего DataPicker и ComboBox с помощью MultiDataTrigger. У меня 3 условия. Это работает для TextBox и TextBlock, но тот же код не работает для моих DatePicker и ComboBox. Знаете почему, пожалуйста? Мой код:
<ComboBox.Style>
<Style TargetType="ComboBox">
<Setter Property="BorderBrush" Value="Transparent" />
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding ElementName=ProgramNameComboBox, Path=IsEnabled}" Value="True" />
<Condition Binding="{Binding ElementName=ProgramNameComboBox, Path=SelectedItem}" Value="" />
<Condition Binding="{Binding ElementName=SaveLabel, RelativeSource={RelativeSource Self}, Path=Content}" Value="Save" />
</MultiDataTrigger.Conditions>
<Setter Property="BorderBrush" Value="Red" />
</MultiDataTrigger>
</Style.Triggers>
</Style>
</ComboBox.Style>
<DatePicker x:Name="StartDateDataPicker" IsEnabled="{Binding IsRowEnabled}" SelectedDate="{Binding StartDate, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" > <!--BorderBrush="{Binding StartDateBorderBrushColor}"-->
<DatePicker.Style>
<Style TargetType="DatePicker">
<Setter Property="BorderBrush" Value="Transparent" />
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding ElementName=StartDateDataPicker, Path=IsEnabled}" Value="True" />
<Condition Binding="{Binding ElementName=StartDateDataPicker, Path=SelectedDate}" Value="null" (I also tried : "01/01/0001") />
<Condition Binding="{Binding ElementName=SaveLabel, Path=Content}" Value="Save" />
</MultiDataTrigger.Conditions>
<Setter Property="BorderBrush" Value="Red" />
</MultiDataTrigger>
</Style.Triggers>
</Style>
</DatePicker.Style>
</DatePicker>
Спасибо