如何設置觸發器取決於兒童的財產? 就像我想改變頭我擴展取決於是否擴展的的ListView 確實有子女或沒有。將觸發器的屬性設置爲兒童
但我總是得到一個Comilor誤差,即HasItems解決不了......
<Expander Header="Expand to add new ports">
<Expander.Resources>
<Style TargetType="{x:Type Expander}">
<Style.Triggers>
<Trigger Property="Content.HasItems" Value="False">
<Setter Property="Header" Value="No children" />
</Trigger>
</Style.Triggers>
</Style>
</Expander.Resources>
<ListView ItemsSource="{Binding Path=SomeItems}">
</ListView>