私はこれを試してみたが、言った:ListViewのアイテムの色とフォントサイズを変更するにはどうすればいいですか?
私はあなたのリストビューのレイアウトを作成するために
ViewCell
を使用することをお勧め
var template = new DataTemplate(typeof(TextCell));
template.SetBinding(TextCell.TextColorProperty,Color.Black);
私はこれを試してみたが、言った:ListViewのアイテムの色とフォントサイズを変更するにはどうすればいいですか?
私はあなたのリストビューのレイアウトを作成するために
ViewCell
を使用することをお勧め
var template = new DataTemplate(typeof(TextCell));
template.SetBinding(TextCell.TextColorProperty,Color.Black);
Xamarin.Forms.BindingBaseするXamarin.Forms.Colorから変換できません
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="demoListView.ImageCellPage">
<ContentPage.Content>
<ListView x:Name="listView">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout BackgroundColor="#eee"
Orientation="Vertical">
<StackLayout Orientation="Horizontal">
<Image Source="{Binding image}" />
<Label Text="{Binding title}"
TextColor="#f35e20" />
<Label Text="{Binding subtitle}"
HorizontalOptions="EndAndExpand"
TextColor="#503026" />
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ContentPage.Content>
</ContentPage>
pl問題を適切に説明してください。あなたが何を求めているのかは分かりません。 – Shuvra
私はアイテムとしてもTextCellを持っているListviewを持っています。私はTextCellのTextColorを変更する必要があります。なぜなら、デフォルトでは赤色であるからです。 – KosovoDev
公式ガイドを確認してください:https://developer.xamarin.com/guides/xamarin-forms/user-interface/listview/customizing-cell-appearance/公式の文書でうまくカバーされている非常に基本的な質問をしています。 – EvZ