Hello Xamarin,
I would like to change text property of an SVG image at runtime.
I use FFImageLoading library on a forms application.
In the xaml definition I use :
<ffSvg:SvgCachedImage Source="test.svg" Grid.Row="1" Grid.Column="2" x:Name="imagea" Grid.ColumnSpan="2" />
And it displays without problem.
In the SVG image, here is the text part :
< text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:42.84254456px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.07106364"
x="49.873535"
y="44.078949"
id="text12"
transform="scale(0.4246626,2.3548106)"><tspan
sodipodi:role="line"
id="tspan10"
x="49.873535"
y="44.078949"
style="stroke-width:1.07106364">ESSAI DE TEXTE</tspan></text>
I would like to change ESSAI DE TEXTE according to the platform langage (localization)
In the cs file, I added a dictionary :
Dictionary<string, string> Map = new Dictionary<string, string>();
Map.Add("ESSAI", "TRY");
imagea.ReplaceStringMap = Map;
imagea.ReloadImage();
But nothing change in the image...
By the way how could I add the Map dictionnary into the Xaml image definition ?
Could you help me please ?
Alain