Get error when I binde HexColor of Tint transformation
See original GitHub issueHi, I use ffimageloading in the listView with a TintTransformation, so The binding works fine for image source but for HexColor I get error for missing property. I’v defined a string property for HexColor but It dosn’t accept such property:
`<flv:FlowListView SeparatorVisibility=“None” HasUnevenRows=“true” FlowItemTapped=“OnItemTapped” FlowColumnMinWidth=“60” FlowTappedBackgroundColor=“Blue” FlowTappedBackgroundDelay=“50” FlowItemsSource=“{Binding Items}” x:Name=“listView”>
<flv:FlowListView.FlowColumnTemplate>
<DataTemplate>
<Grid Padding="3">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ffimageloading:CachedImage x:Name="selectIcon" WidthRequest="50" HeightRequest="50" DownsampleToViewSize="true"
Source = "{Binding IconPath, Converter={StaticResource ImageSourceConverter}}">
<ffimageloading:CachedImage.Transformations>
<fftransformations:TintTransformation HexColor="{Binding HexColor}" EnableSolidColor="true"/>
</ffimageloading:CachedImage.Transformations>
</ffimageloading:CachedImage>
</Grid>
</DataTemplate>
</flv:FlowListView.FlowColumnTemplate>
</flv:FlowListView>
My model is:
public class Icons { public string IconPath { get; set; } public string HexColor { get; set; } }
any idea? Thanks
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
How do I convert a Color to a Brush in XAML?
The Fill property takes a Brush object, so I need an IValueConverter object to perform the conversion. Is there a built-in converter in...
Read more >Color state list resource
A ColorStateList is an object you can define in XML and apply as a color that actually changes colors depending on the state...
Read more >PIXI.utils
Converts a hexadecimal color number to an [R, G, B] array of normalized floats (numbers from 0.0 to 1.0). Name, Type, Attributes, Default,...
Read more >Functions
Bind the evaluation of a ruleset to each member of a list. Parameters. list - a comma or space separated list of values....
Read more >Color picker | Substance 3D Painter
The color picker allows to set a color to paint or project on the mesh. It can be used to pick colors from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh HexColor is not defined as a bindable property.
You can make a PR to make it a bindable property, we just made a custom class to wrap that and have a bindable property.
Well I managed to find a solution for the problem I posted in the recent comment
`public class TintedCachedImage : CachedImage { public static BindableProperty TintColorProperty = BindableProperty.Create(nameof(TintColor), typeof(Color), typeof(TintedCachedImage), Color.Transparent, propertyChanged: UpdateColor);
I added a custom property to enable directly loading svg image from xml
usage
<local:TintedCachedImage Grid.Row="0" SvgSource="reset.svg" TintColor="{StaticResource BrandColor}" />