I have a dataset that I want to display the error if I get an error returned from the database. Otherwise, I would like to display the data.
I can't find anything that states that listview items can be visible. So, I generated two listviews and I was going to set the style of one be visible and hidden depending on the success value.
<Style TargetType="ListView" x:Name="hideifsuccessfulstyle"><Style.Triggers><DataTrigger Binding="{Binding Path=Success}" Value="1"><Setter Property="Visibility" Value="Hidden" /></DataTrigger></Style.Triggers></Style><Style TargetType="ListView" x:Name="displayifsuccessfulstyle"><Style.Triggers><DataTrigger Binding="{Binding Path=Success}" Value="1"><Setter Property="Visibility" Value="Visible" /></DataTrigger></Style.Triggers></Style>
However, I get an error when running it. I believe it is because I'm using the target type twice. When I remove one of the items, it will work, but I can't get to my goal with only changing one list.