這是我Multitrigger:WPF Multitrigger不能爲null
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=Dringlichkeit, RelativeSource={RelativeSource Self}}" Value="Normal"/>
<Condition Property="ItemsControl.AlternationIndex" Value="0"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" Value="LightPink"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=Dringlichkeit, RelativeSource={RelativeSource Self}}" Value="Normal"/>
<Condition Property="ItemsControl.AlternationIndex" Value="1"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" Value="Pink"/>
</MultiDataTrigger>
如果我用這個觸發器爲DataTrigger
,結合作品。我想要AlternationIndex
我認爲這是因爲我通過SQL加載數據,但是當我在SQL之後加載樣式時,仍然存在綁定具有NULL
值的問題。
感謝編輯! –