Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8495023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:27:22+00:00 2026-06-10T23:27:22+00:00

I have a list of objects as the item source for the datagrid. I

  • 0

I have a list of objects as the item source for the datagrid. I also have buttons with tooltips but I want the tooltips to be “localize-able”/dynamic. I don’t want to explicitly add another property on the class of the objects (would be ugly) so instead, I want to create a string in the UserControl and do something like

public string ThisTag { get { return "someString"; } }

and on the xaml

<Button ...>
   <ToolTipService.ToolTip>
      <Tooltip Style={StaticResource ToolTipStyle} Tag={Binding Source=thisUserControl.ThisTag} />
...

the style

<Style x:Name="ToolTipStyle" TargetType="ToolTip">
   <Setter Property="Template">
       <Setter.Value>
           <ControlTemplate TargetType="ToolTip">
               <Grid>
                  <TextBlock Text="{TemplateBinding Tag}" Foreground="{StaticResource AnotherResource}"></TextBlock>
...
  1. Is that possible or is there a similar simple way to bind to a property?
  2. What would be the proper syntax to bind to the string?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T23:27:23+00:00Added an answer on June 10, 2026 at 11:27 pm

    I can’t quite make the Binding Path and ElementName style work so I settled to making a custom class like so

    public class LocalizedDatagridButtonsTooltips
    {
       public string TooltipOne { get { return SomeMethodToTranslate("This Phrase"); } }
       ...
    }
    

    create an instance of the class in the App.xaml (depends where the class is declared). “local” is declared on xaml.

    <local:LocalizedDatagridButtonsTooltips x:Key="LocalizedTooltips"/>
    

    Then setting the tag or whatever element that needs the string in the xaml (in my case, the Tag attribute needs the binding)

    <Tooltip Tag="{Binding Source={StaticResource LocalizedTooltips}, Path=TooltipOne}" >
    

    I got the solution from here:

    http://www.c-sharpcorner.com/uploadfile/dpatra/using-static-resource-in-silverlight-3-application/

    these solutions also works for 4-5 (I think SL 5 has the “AncestorType” accr. dbaseman).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the project I'm working on I have got a list List<Item> with objects
I have a list of objects and I want to remove all the ones
I have datagrid with list of MyPlayer objects linked to ItemsSource, there are ComboBoxes
I have a WPF Datagrid binded with list of interface objects. Consider, ClsEmployee class
I have List objects which are shown like this: www.mysite.com/lists/123 Where 123 is the
I have 2 List objects: List<int> lst1 = new List<int>(); List<int> lst2 = new
I have List where myObj has it own list of objects called example mySubObj.
I have a list of objects: [Object_1, Object_2, Object_3] Each object has an attribute:
I have a list of objects (mainly int, string, double) And I would like
I have a list of objects which uses paging in my home > index.cshtml.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.