Are there any other {TemplateBinding xxxxxx} besides Title and Details that can be used to pass in data. Tried using Tag and Name but those both don't appear to keep the data even if I set them.
I am trying to put the following in the details style. I am using the Title to set the Image source and Details for the textblock, but need to pass in a 3rd piece of data for the link.
<Image Name="Image" HorizontalAlignment="Left" VerticalAlignment="Top" Source="{TemplateBinding Title}" Grid.Row="0"></Image><HyperlinkButton Name="hlAggregate" TargetName="_Blank" NagivationUri="{TemplateBinding ??????}"></HyperlinkButton><TextBlock Name="tbDetails" Grid.Row="1" MaxWidth="300" Text="{TemplateBinding Details}"></TextBlock>
Both the Title and Details properties are actually of type object, not string, so you could create a class that has a Text Property and a Url property to set for the Details and then do these:
{TemplateBinding Details.Text}
{TemplateBinding Details.Url}
Could you give that a try and let me know how it goes?
-Graham
Hadn't thought of doing it that way, that would solve alot of problems if it worked. Currently {TemplateBinding Title} is actutally the image, not just the url. Tried creating a simple class with the two properties but something must be missing. Control renders but when the details tries to show it crashes.
sorry, should have tested it first, thought that would work with a TemplateBinding, but I think the path is being interpreted as a attached property expression or something. Try something of this form instead.
{Binding Path=Details.Text, RelativeSource={RelativeSource TemplatedParent}}
Works great, thanks. This will solve alot of problems.