我正在使用xamarin.forms。
我在xaml页面中使用以下代码:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:Syncfusion ="clr-namespace:Syncfusion.SfCalendar.XForms;assembly=Syncfusion.SfCalendar.XForms"
x:Class="MyProject.View.WOList">
<ContentPage.Resources>
<ResourceDictionary>
<DataTemplate x:Key="weathertemplate">
<Grid HorizontalOptions="Center" >
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label x:Name="txtopen" Text="{Binding Date.Day}" HorizontalOptions="Center" TextColor="Black" HorizontalTextAlignment="Center" FontSize="16" />
....
</Grid>
</DataTemplate>
</ResourceDictionary>
</ContentPage.Resources>
<ContentPage.Content>
...
</ContentPage.Content>
</ContentPage>
我想在后面的代码上为标签(x:Name =“txtopen”)分配“Text”。但是没有显示“txtopen”背后的代码。
请帮我解决此问题。