Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Binding TextColor on Label not working

$
0
0
<ListView x:Name="listBehavior" ItemsSource="{Binding .}"
          ItemTapped="OnItemTapped"
          IsGroupingEnabled="true"
          GroupDisplayBinding="{Binding Key}"
          >
  <ListView.ItemTemplate>
    <DataTemplate>
      <ViewCell>
        <ViewCell.View>
        <Grid VerticalOptions="Center" HorizontalOptions="StartAndExpand">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="50" />
          </Grid.ColumnDefinitions>
          <Label Text="{Binding BehaviorName}" FontSize="15" Grid.Column="0" />
          <Label Text="{Binding BehaviorRating}" FontSize="15" TextColor="{Binding BehaviorRatingColor}" Grid.Column="1" />
        </Grid>
        </ViewCell.View>
      </ViewCell>
    </DataTemplate>
  </ListView.ItemTemplate>
</ListView>

All working as expected except the {Binding BehaviorRatingColor} part. No errors, but the color is not applying. Model has the right data, for example: BehaviorName = "Driving", BehaviorRating="Critical", BehaviorRatingColor="Green"

Please help, Thanks in advance.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>