Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
523
TemplateBinding Question
posted

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>

Parents
No Data
Reply
  • 30692
    Suggested Answer
    Offline posted

    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

Children