Forum Xamarin.Forms

ListView TextColor

FritzSwitzerFritzSwitzer USMember ✭✭

In my Xamarin Forms app, I'm trying to change the text color of my listview items. In the UWP the items are black, which I want but in the Android Listview they are silver.

I've tried to add a simple Listview.ItemTemplate but not successful.

Here is my xaml

     <StackLayout Grid.Row="2"  Grid.RowSpan="2" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Vertical" HorizontalOptions="FillAndExpand">
                            <ListView x:Name="SelectionListBox" Grid.Column="0" Grid.ColumnSpan="3" >

                            </ListView>
                        </StackLayout>

And here is the .cs code.

  List<Templates> templates = App.Database.GetAllTemplates();
                    myCollection = templates.Select(x => $"{x.TemplateFile.ToString()} ~ {x.TemplateName} ~ {x.Category}").ToList();

 SelectionListBox.ItemsSource = myCollection;

Best Answers

  • FritzSwitzerFritzSwitzer USMember ✭✭
    Accepted Answer

    Thanks Jezh that worked.

Answers

  • FritzSwitzerFritzSwitzer USMember ✭✭
    Accepted Answer

    Thanks Jezh that worked.

Sign In or Register to comment.