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 8809987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:00:50+00:00 2026-06-14T03:00:50+00:00

I have an attached property that looks like this: <Button Styles:ToolTip.Title=The Title/> I setup

  • 0

I have an attached property that looks like this:

<Button Styles:ToolTip.Title="The Title"/>

I setup a style to access show it like this:

<TextBlock Text="{Binding Path=(Styles:ToolTip.Title), 
   RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"/>

The problem with this binding is that it can ONLY work when my property is on a Button.

I am making a custom ToolTip feature, so I want it to work on any control that would normally show a tooltip.

Normally I would just bind to TemplatedParent. But that is the ContentPresenter.

How can I get a source pointing back to the object that has the attached property on it (and not reference it statically in code)?

Here is my full style in case it is needed.

UPDATE:

This was what did it. I changed my RegisterAttached method’s last parameter to be this:

new FrameworkPropertyMetadata(default(string), 
                              FrameworkPropertyMetadataOptions.Inherits)
  • 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-14T03:00:51+00:00Added an answer on June 14, 2026 at 3:00 am

    You could try making the property an inherited dependency property. Then setting the value on the parent Button would cause the child TextBlock inherit the value

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

Sidebar

Related Questions

I have created my own Attached Property like this: public static class LabelExtension {
So I have a class that looks like this: internal class MyClass { public
Assuming I have an attached property defined like that : public static string GetMyProperty(DependencyObject
I currently have an ASP.Net Web Form that looks like this: Each section of
I have written a attached property which stores amongst others a help text. This
I'm developing an application in WPF (.NET 4). I have an attached property that
I have an entity with a status property that I would like to update.
If I have a UserControl hosted in a Window that looks like: <Window xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
Styling gurus, I need help coming up with an Expander style that looks like
I have a control that uses a certain inherited attached property, and I found

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.