mgierlasinski / MagicGradients

Draw breathtaking backgrounds in your Xamarin.Forms application. It's a kind of magic.
MIT License
369 stars 21 forks source link

Cannot resolve type magic:CssGradientSource #194

Closed marsjanin20 closed 2 years ago

marsjanin20 commented 2 years ago

I've created page using sample code from readme. Intelli sense suggest me to use magic:CssGradientSource but during compilation it throws error XFC0000: Cannot resolve type "magic:CssGradientSource". I'm using:

Code:

<?xml version="1.0" encoding="utf-8" ?>
<views:BaseContentPage 
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:magic="http://magic.com/schemas/gradients"
    ...
    Title="Main page">
    <ContentPage.Content>
        <Grid>
            <magic:GradientView>
                <magic:CssGradientSource>
                    <x:String>
                        <![CDATA[
                    linear-gradient(225deg, rgba(38,208,82,1) 0%, rgba(26,142,56,1) 100%)
                ]]>
                    </x:String>
                </magic:CssGradientSource>
            </magic:GradientView>
        </Grid>
    </ContentPage.Content>
</views:BaseContentPage>
bbenetskyy commented 2 years ago

@marsjanin20 Your code looks valid.

Please try to clean and then re-build. Also, you may try to delete bin and obj 😉

marsjanin20 commented 2 years ago

Thanks, now it works properly! 😃