4
votes

I'm Working on Xamarin Forms project using Visual Studio 2017 , I want to show few texts in side label using different styles so i used span text as below but it gives me compile error "No property, bindable property, or event found for 'Text', or mismatching type between value and property." My code is below .

<Label TextColor="{Binding ColorStatus}" Margin="0,0,0,0" HorizontalTextAlignment="Start" FontSize="Medium">
                            <Label.FormattedText>
                                <FormattedString>
                                    <Span Text="Thank you." FontAttributes="Bold"/>
                                    <Span Text="You have tagged-"  FontAttributes="Bold"/>
                                    <Span Text= "{Binding ActivityName}"  FontAttributes="Bold"/>
                                </FormattedString>
                            </Label.FormattedText>
                        </Label>
1
What version of Xamarin.Forms are you using?Gerald Versluis
Can you post the code for your view (or page) and the code of the datamodel you are trying to bind to?Markus Michel
<Label TextColor="{Binding ColorStatus}" Margin="0,0,0,0" HorizontalTextAlignment="Start" FontSize="Large" Text="{Binding ActivityName,}"></Label> when i put like this it's workinfine so nothing wrong with ' ActivityName' binding propertycharitht99 perera

1 Answers

4
votes

Update your Xamarin.Forms nuget package to the latest one. Bindable spans are available from Xamarin.Forms 3.1.0+ version.

More about releases and features you can find it here.