我正在使用Xamarin.Forms,并且正在从SQLite.NET DB检索记录到ListView中。我已经使用了数据绑定;但是,我想以dd / mm / yy格式显示DateTime记录。
当前,Date1和Date2以mm / dd / yyyy 00:00:00显示日期。可以更改吗?
<ListView x:Name="lstOrdersList">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal" BackgroundColor="White" >
<StackLayout Padding="0,0" Orientation="Vertical" VerticalOptions="StartAndExpand" HorizontalOptions="StartAndExpand" >
<StackLayout Orientation="Horizontal" BackgroundColor="White" >
<Label Text = "{Binding Name}" FontSize="12" TextColor="Black" />
<Label Text = "{Binding DateIn}" FontSize="10" TextColor="Black" />
<Label Text = "{Binding DateOut}" FontSize="10" TextColor="Black" />
</StackLayout>
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>