'Cannot Resolve type "DateTime"
I am trying to get my API working for an app I am building in Xamarin Forms, but I am having trouble with getting the DateTime to work. I keep receiving an error XFC0000: Cannot resolve type "DateTime". I cannot figure out how to fix this error and have searched everywhere I can to get this resolved.
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:ob="clr-namespace:Sweater_Weather_2.ViewModels"
x:Class="Sweater_Weather_2.Views.WeatherPage">
<ContentPage.BindingContext>
<ob:WeatherViewModel/>
</ContentPage.BindingContext>
<CollectionView ItemsSource="{Binding WeatherList}">
<CollectionView.ItemsLayout>
<GridItemsLayout Orientation="Vertical" />
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<StackLayout Padding="10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" BackgroundColor="#E9E9E5" >
<Label Grid.Row="0" Grid.Column="0" Text="{Binding timezone}" FontSize="20" FontAttributes="Bold" TextColor="#52524E"/>
<Label Grid.Row="1" Grid.Column="0" Text="{Binding Source={x:Static sys:DateTime.Now}, StringFormat='{0:MMMM dd, yyyy}'}"/>
</Grid>
Any help would be appreciated, if more coded is needed please let me know.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
