title: Conditional formatting of a XAML listview
body: <p>I am incredibly new to working with UWP. I apologize if this is something basic. </p>
  
  <p>I'm going through some of the samples provided by Microsoft on GitHub. ( <a href="https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/XamlListView" rel="nofollow noreferrer">https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/XamlListView</a> )</p>
  
  <p>What I'm attempting to do, is to use the XAML ListView example, but apply some conditional formatting to the list if a condition is met. Such as if Contact.Position == "Developer", change the color of the text to green. </p>
  
  <p>The solution I found in the link below looked promising, however, the style triggers using in WPF are not available in UWP .
  <a href="https://stackoverflow.com/questions/15623615/conditional-formating-of-a-textblock-within-a-listbox-s-datatemplate">Conditional formating of a TextBlock within a Listbox’s DataTemplate</a></p>
  
  <p>The XAML generated for each item in the listView is defined as:</p>
  
  <pre><code>&lt;DataTemplate x:Name="SpectraListViewTemplate" x:DataType="data:spectraClass"&gt;
      &lt;Grid&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="*"/&gt;
              &lt;RowDefinition Height="*"/&gt;
          &lt;/Grid.RowDefinitions&gt;
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition Width="Auto"/&gt;
              &lt;ColumnDefinition Width="*"/&gt;
          &lt;/Grid.ColumnDefinitions&gt;
          &lt;Ellipse x:Name="Ellipse"
                   Grid.RowSpan="2"
                   Width ="32"
                   Height="32"
                   Margin="6"
                   VerticalAlignment="Center"
                   HorizontalAlignment="Center"
                   Fill="LightGray"/&gt;
          &lt;TextBlock Grid.RowSpan="2"
                     Width="{Binding ElementName=Ellipse, Path=Width}"
                     Height="{Binding ElementName=Ellipse, Path=Height}"
                     Margin="6"
                     Foreground="{ThemeResource ApplicationPageBackgroundThemeBrush}"
                     HorizontalAlignment="Center"
                     VerticalAlignment="Center"
                     Text="{x:Bind Id}"
                     x:Phase="1"/&gt;
          &lt;TextBlock x:Name="SpectraListViewTemplateNameTextBox"
                      Grid.Column="1"
                     Text="{x:Bind Name}" 
                     x:Phase="1"  
                     Style="{ThemeResource BaseTextBlockStyle}"
                     Margin="12,6,0,0"/&gt;
          &lt;TextBlock  Grid.Column="1"
                      Grid.Row="1"
                      Text="{x:Bind Date}" 
                      x:Phase="2"
                      Style="{ThemeResource BodyTextBlockStyle}"
                      Margin="12,0,0,6"/&gt;
      &lt;/Grid&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>Does anyone have some advice or a direction I should be looking?</p>