HorusSoftwareUY / Xamarin.Forms.Skeleton

The new loading approach for cool apps in Xamarin Forms
MIT License
450 stars 52 forks source link

Adding Skeleton attributes produce build error. #14

Open richardvaldiviesomacias opened 4 years ago

richardvaldiviesomacias commented 4 years ago

I am getting the following errors when I added the attributes for Skeleton in any component:

MainPage.xaml(25,25): Error: Position 16:25. No property, bindable property, or event found for 'Animation', or mismatching type between value and property. 

MainPage.xaml(28,28): Error: XLS0112: Expected '>'.  IntelliSense

The first error will disappear after I remove the animation property. I am assuming the second error it is because the component did not understand the skeleton's attributes. I am showing these two examples.

 xmlns:sk="clr-namespace:Xamarin.Forms.Skeleton;assembly=Xamarin.Forms.Skeleton"
<Frame
            Margin="15"
              sk:Skeleton.Animation="Fade"
              sk:Skeleton.BackgroundColor="#D3D3D3"
              sk:Skeleton.IsParent="True"
              BackgroundColor="White"
              BorderColor="#DCDCDC"
              HasShadow="False"
              IsClippedToBounds="True">

<ListView
            sk:Skeleton.Animation="Fade"
            sk:Skeleton.IsBusy="{Binding IsBusy}"
            sk:Skeleton.IsParent="True"
            BackgroundColor="Transparent"
            ItemTemplate="{StaticResource ItemTemplate}"
            ItemsSource="{Binding Products}"
            RowHeight="100"
            SelectionMode="None"
            SeparatorVisibility="None"
            VerticalOptions="FillAndExpand" />

Version Skeleton used: 2.0.0 Xamarin forms 4.6.0.847

Here is how you can reproduce the error: https://drive.google.com/drive/folders/1979EgbgHfTGGVmRcWo1H91g_uo3BOoWe?usp=sharing

Thanks for this component and thanks for all your help.

richardvaldiviesomacias commented 4 years ago

Apparently assigning Animation = "Fade" was the problem. Using sk:Skeleton.Animation="{sk:DefaultAnimation Fade}" fixed the problem.