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
8.4 C
New York
Sunday, November 24, 2024

c# – How do I make an animated svg work? .Internet MAUI


I’ve an animated SVG that I wish to implement in my utility, I’ve discovered a means however I do not know if it’s the most acceptable.

The factor is that it really works for Android whereas it does not work on iOS.

That is the xaml.cs:

non-public void LoadSvg()
{
    string svgContent = @"
            <svg viewbox='0 0 64 48'>
                <model>
                    :is(#back2087, #front2087) {
                        fill: none;
                        stroke-width: 3;
                        stroke-linecap: spherical;
                        stroke-linejoin: spherical;
                    }
                    #back2087 {
                        fill: none;
                        stroke: currentColor;
                        opacity: 0.1;
                    }
                    #front2087 {
                        fill: none;
                        stroke: currentColor;
                        stroke-dasharray: 48, 144;
                        stroke-dashoffset: 192;
                        animation: dash_682 1.4s linear infinite;
                    }
                    @keyframes dash_682 {
                        72.5% {
                            opacity: 0;
                        }
                        to {
                            stroke-dashoffset: 0;
                        }
                    }
                </model>
                <polyline factors="0.157 23.954, 14 23.954, 21.843 48, 43 0, 50 24, 64 24" id='back2087'/>
                <polyline factors="0.157 23.954, 14 23.954, 21.843 48, 43 0, 50 24, 64 24" id='front2087'/>
            </svg>";

SvgWebView.Supply = new HtmlWebViewSource
{
    Html = svgContent
};

}

And within the view:

 <WebView x:Identify="SvgWebView" HeightRequest="70" WidthRequest="70" BackgroundColor="Clear" />

Related Articles

Social Media Auto Publish Powered By : XYZScripts.com