Is there a way in XAML to determine if the ListBox has data?
I wanna set its IsVisibile property to false if no data.
Is there a way in XAML to determine if the ListBox has data?
I wanna set its IsVisibile property to false if no data.
<ListBox.Style>
<Style TargetType="ListBox">
<Setter Property="Visibility" Value="Visible"/>
<Style.Triggers>
<Trigger Property="HasItems" Value="False">
<Setter Property="Visibility" Value="Hidden"/>
</Trigger>
</Style.Triggers>
</Style>
</ListBox.Style>