Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

ListView Triggers - Help?

$
0
0

Hi, is it possible to style ListView items using Triggers?

Ie can the following be achieved? (using triggers):
1. altering the background colour of the selected item in a listview
2. or changing View/DataTemplate Properties based on the data context (ie change all "Overdue" items to Red text)

For an Entry we could for instance use something like this...

<Style x:Key="EntryTrigger" TargetType="Entry">
        <Style.Triggers>
          <Trigger Property="IsFocused" Value="True" TargetType="Entry">
            <Setter Property="TextColor" Value="Green" />
          </Trigger>
        </Style.Triggers>
</Style>

In WPF this would have been fairly simple to do in a ListBox but I can't see how to do this in Forms. Does anyone know how?


Viewing all articles
Browse latest Browse all 77050

Trending Articles