London Escorts sunderland escorts 1v1.lol unblocked yohoho 76 https://www.symbaloo.com/mix/yohoho?lang=EN yohoho https://www.symbaloo.com/mix/agariounblockedpvp https://yohoho-io.app/ https://www.symbaloo.com/mix/agariounblockedschool1?lang=EN
2.1 C
New York
Saturday, February 1, 2025

android – Add Motion on a part of Attributed Textual content in Xamarin C# MVVMCross


I’m making a Cross Platform utility in Xamarin MVVMCross during which I’m utilizing an Attributed Textual content for exhibiting a clickable hyperlink on some a part of a textual content.

I’ve created my customized class with MvxValueConverter and utilized a Binding in my iOS class.

Beneath is my code.

public class FreeShippingConverter : MvxValueConverter<string, NSAttributedString>
    {
        protected override NSAttributedString Convert(string worth, Kind targetType, object parameter, CultureInfo tradition)
        {
            var outcome = new NSMutableAttributedString(worth);
            var startIndex = worth.IndexOf(Strings.Check, StringComparison.InvariantCultureIgnoreCase);
            if (startIndex < 0)
            {
                return outcome;
            }

            var vary = new NSRange(startIndex, Strings.Check.Size);
            outcome.AddAttribute(UIStringAttributeKey.Font, TextStyle.B2Bold.Font(), vary);
            outcome.AddAttribute(UIStringAttributeKey.ForegroundColor, Colours.Bluescale4.ToNativeColor(), vary);
            return outcome;
        }
    }

Beneath is the Binding code from TableViewCell.

this.CreateBinding(FreeShippingText).For(v => v.AttributedText).To((FulfilmentOptionsCellViewModel vm) => vm.FreeShippingText).WithConversion<FreeShippingConverter>().Apply();

Output

Now I need to create an Motion when consumer clicks on “Perks Members“.

bind that in iOS and Android?

Please assist me.

Related Articles

Social Media Auto Publish Powered By : XYZScripts.com