title: Using VisualStateGroup inside Binded ListView
body: <p>I have a binded listview in UWP and I want to show or hide some controls inside the   ItemTemplate based on some properties</p>
  
  <p>The XAML i am using is here for binding ObservableCollection</p>
  
  <pre><code>   &lt;ListView x:Name="lvwMovieWatchlist"  ItemsSource="{x:Bind Books}" Margin="10"&gt;
              &lt;ListView.ItemsPanel&gt;
                  &lt;ItemsPanelTemplate&gt;
                      &lt;ItemsWrapGrid Orientation="Horizontal" /&gt;
                  &lt;/ItemsPanelTemplate&gt;
              &lt;/ListView.ItemsPanel&gt;
              &lt;ListView.ItemTemplate&gt;              
                  &lt;DataTemplate x:DataType="data:BookModel"&gt;
                      &lt;Grid&gt;
                          &lt;Grid.ColumnDefinitions&gt;
                              &lt;ColumnDefinition Width="Auto"/&gt;
                              &lt;ColumnDefinition Width="*"/&gt;
                          &lt;/Grid.ColumnDefinitions&gt;
                          &lt;Border Width="156" Height="200"&gt;
                              &lt;Image Source="{Binding CoverImage}" Stretch="UniformToFill"/&gt;
                          &lt;/Border&gt;
                          &lt;StackPanel Grid.Column="1" Orientation="Vertical"&gt;
                              &lt;TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextBlockStyle}" TextWrapping="NoWrap" Margin="9.6,0"/&gt;
                              &lt;TextBlock Text="{Binding Name}" Style="{StaticResource SubtitleTextBlockStyle}" TextWrapping="NoWrap" Margin="9.6,0"/&gt;
                              &lt;StackPanel Orientation="Horizontal" Margin="10"&gt;
                                  &lt;Button Name="Btn_Download" Tag="{Binding}" Click="Btn_Download_Click"&gt; DOWNLOAD&lt;/Button&gt;                                
                                  &lt;Button Name="Btn_Read" Tag="{Binding}" Click="Btn_Read_Click"&gt; READ&lt;/Button&gt;                                
                              &lt;/StackPanel&gt;
                          &lt;/StackPanel&gt;
                      &lt;/Grid&gt;
                  &lt;/DataTemplate&gt;             
              &lt;/ListView.ItemTemplate&gt;
          &lt;/ListView&gt;
  </code></pre>
  
  <p>The 2 buttons Btn_Download   and Btn_Read are in question here
  If Status property is "read" then i want to set the visibility as Visible for Btn_Read otherwise show Btn_Download button </p>
  
  <p>In WPF i have Trigger for achieveing the same like </p>
  
  <pre><code>        &lt;DataTemplate.Triggers&gt;
              &lt;DataTrigger Binding="{Binding Status}" Value="read"&gt;                   
                  &lt;Setter TargetName="Btn_Read" Property="Visibility" Value="Visible"/&gt;
                  &lt;Setter TargetName="Btn_Download" Property="Visibility" Value="Collapsed"/&gt;                 
              &lt;/DataTrigger&gt;                                              
          &lt;/DataTemplate.Triggers&gt;
  </code></pre>
  
  <p>But in UWP there is no Trigger only VisualStateManager.VisualStateGroups is avaiable. 
  So how can i make it using VisualStateGroup inside the ItemTemplate</p>