Forum Xamarin.Forms

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Binding FFImage BorderHexColor is now working

shafeekfsdshafeekfsd Member
edited February 25 in Xamarin.Forms
             ffImage:CachedImage x:Name="imgAuthor"
                                  Success="imgAuthor_Success"
                                  Source="{Binding ProfileImage}"
                                  HeightRequest="40">

                 ffImage:CachedImage.Transformations
            fTransformations:CircleTransformation BorderHexColor="{Binding CategoryBg}" BorderSize="5" 

             ffImage:CachedImage.Transformations

             ffImage:CachedImage

Answers

  • ColeXColeX Member, Xamarin Team Xamurai

    Notice BorderHexColor is string type and should be set as Hex value , maybe you set Color on CategoryBg ,I test with the following code , it works fine.

    Code

    xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"
                 xmlns:fftransformations="clr-namespace:FFImageLoading.Transformations;assembly=FFImageLoading.Transformations"
    
        <ContentPage.Content>
            <ffimageloading:CachedImage 
                HorizontalOptions="Center" 
                VerticalOptions="Center"
                WidthRequest="300" 
                HeightRequest="300"
                DownsampleToViewSize="true"
                Source = "http://loremflickr.com/600/600/nature?filename=simple.jpg">
    
                <ffimageloading:CachedImage.Transformations>
                    <fftransformations:CircleTransformation  BorderSize="5" BorderHexColor="#ff00ff" />
                </ffimageloading:CachedImage.Transformations>
            </ffimageloading:CachedImage>
        </ContentPage.Content>
    


    Xamarin forums are migrating to a new home on Microsoft Q&A!
    We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
    For more information, please refer to this sticky post.

  • shafeekfsdshafeekfsd Member

    Hi Colex,

    in my case, borderhex color is coming through the data-binding.

  • ColeXColeX Member, Xamarin Team Xamurai

    @shafeekfsd said:
    Hi Colex,

    in my case, borderhex color is coming through the data-binding.

    Check the binding value in viewmodel if it is hex .

Sign In or Register to comment.