I am trying to bind a list of objects to a list of HyperLinks
that are comma-separated, and clickable.
I can do it if it's only one of them per cell, but I don't know how to bind a collection per cell.
Something like this in a single GridViewColumn
cell:
Effect01, Effect02, Effect02, Shader01. Shader02
where clicking any of them will call the binded object's Execute
method.
Each element is:
public class EffectLink : IExecutable
{
public string Name {get; set;}
public void Execute ();
}
as enforced by IExecutable
.
I do it this way because the behaviour of Execute
will depend on whether it's a shader, an effect, etc.
Any ideas?
EDIT:
I found that I could do this:
<TextBlock>
<Hyperlink>Effect01</Hyperlink>
<Hyperlink>Effect02</Hyperlink>
</TextBlock>
So this shows 2 space-separate hyperlinks in a single cell.
Also this question might be related, but it shows how do it in code, not xaml: Nested TextBlocks and Hyperlinks, How do you replicate this XAML in C#?