I have bound a ListBox
to my ViewModel including the ListBox.SelectedItem
. I want to change a visual state depending on if there is one selected or not, but The following doesn't update the state initially, so it stays in the wrong state:
<DataStateBehavior Binding="{Binding SelectedCamera}" Value="{x:Null}" TrueState="CameraSettingsUnselected" FalseState="CameraSettingsSelected"/>
Why is that and how to fix it?