1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-30 15:06:06 +00:00

Préparation links pour Xamarin.Forms 3.2

This commit is contained in:
Yan Maniez 2018-08-03 20:55:56 +02:00
parent a047fb67ff
commit 1183cb62ec

View file

@ -115,6 +115,23 @@
} }
} }
private void AttachLink(Span span, KeyValuePair<string, string> link)
{
//span.GestureRecognizers.Add(new TapGestureRecognizer
//{
// Command = new Command(async () =>
// {
// try
// {
// NavigateToLink(link.Value);
// }
// catch (Exception)
// {
// }
// }),
//});
}
#region Rendering blocks #region Rendering blocks
private void Render(Block block) private void Render(Block block)
@ -536,6 +553,11 @@
else else
{ {
var spans = link.SelectMany(x => CreateSpans(x, this.Theme.Link.FontFamily ?? family, attributes| this.Theme.Link.Attributes, this.Theme.Link.ForegroundColor, this.Theme.Link.BackgroundColor, size)).ToArray(); var spans = link.SelectMany(x => CreateSpans(x, this.Theme.Link.FontFamily ?? family, attributes| this.Theme.Link.Attributes, this.Theme.Link.ForegroundColor, this.Theme.Link.BackgroundColor, size)).ToArray();
//var newlink = new KeyValuePair<string, string>(string.Join("", spans.Select(x => x.Text)), url);
//foreach (var span in spans)
//{
// AttachLink(span, newlink);
//}
links.Add(new KeyValuePair<string, string>(string.Join("",spans.Select(x => x.Text)), url)); links.Add(new KeyValuePair<string, string>(string.Join("",spans.Select(x => x.Text)), url));
return spans; return spans;
} }