ALL BUSINESS
COMIDA
DIRECTORIES
EDUCATIONAL
ENTERTAINMENT
FASHION TIPS
FINER THINGS
FREE CREATOR TOOLS
HEALTH
MARKETPLACE
MEMBER's ONLY
MONEY MATTER$
MOTIVATIONAL
NEWS & WEATHER
TECHNOLOGIA
TELEVISION NETWORKS
USA VOTES 2024
VIDEOS
INVESTOR RELATIONS
IN DEVELOPMENT
Posted by - Latinos MediaSyndication -
on - October 29, 2023 -
Filed in - Technology -
-
364 Views - 0 Comments - 0 Likes - 0 Reviews
I am creating a Cross Platform application in Xamarin MVVMCross in which I am using an Attributed Text for showing a clickable link on some part of a text.
I have created my custom class with MvxValueConverter and applied a Binding in my iOS class.
Below is my code.
public class FreeShippingConverter : MvxValueConverter<string, NSAttributedString> { protected override NSAttributedString Convert(string value, Type targetType, object parameter, CultureInfo culture) { var result = new NSMutableAttributedString(value); var startIndex = value.IndexOf(Strings.Test, StringComparison.InvariantCultureIgnoreCase); if (startIndex < 0) { return result; } var range = new NSRange(startIndex, Strings.Test.Length); result.AddAttribute(UIStringAttributeKey.Font, TextStyle.B2Bold.Font(), range); result.AddAttribute(UIStringAttributeKey.ForegroundColor, Colors.Bluescale4.ToNativeColor(), range); return result; } }
Below is the Binding code from TableViewCell.
this.CreateBinding(FreeShippingText).For(v => v.AttributedText).To((FulfilmentOptionsCellViewModel vm) => vm.FreeShippingText).WithConversion<FreeShippingConverter>().Apply();
Now I want to create an Action when user clicks on "Perks Members".
How to bind that in iOS and Android?
Please help me.