mirror of
				https://github.com/Nioux/AideDeJeu.git
				synced 2025-10-31 07:26:09 +00:00 
			
		
		
		
	Préparation links pour Xamarin.Forms 3.2
This commit is contained in:
		
							parent
							
								
									a047fb67ff
								
							
						
					
					
						commit
						1183cb62ec
					
				
					 1 changed files with 22 additions and 0 deletions
				
			
		|  | @ -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; | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Yan Maniez
						Yan Maniez