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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:48:50+00:00 2026-06-18T02:48:50+00:00

I am styling a TreeViewItem. The item has a content presenter that I wish

  • 0

I am styling a TreeViewItem. The item has a content presenter that I wish to have a tooltip appear:

<ContentPresenter x:Name="PART_Header"
             Cursor="Hand"
             Grid.Column="1"
             ContentSource="Header"
             HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
   <ContentPresenter.ToolTip>
       <ToolTip 
                 Placement="RelativePoint" 
                 VerticalOffset="-2" 
                 HasDropShadow="False"
                 BorderBrush="#767676" 
                 Background="#FFF" 
                 Padding="0,1,0,1"
                 VerticalAlignment="Center"
                 Content="{Binding RelativeSource={RelativeSource FindAncestor, 
                 AncestorType={x:Type ContentPresenter}}, Path=Content}"/>
   </ContentPresenter.ToolTip>
</ContentPresenter>

This is effectively part of a larger setter that sets the item’s control template. However, I cannot seem to get the Tooltip’s content binded to the content presenter’s content. It keeps appearing blank (a tiny black box). I am new to binding and WPF, so please excuse.

  • 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-18T02:48:51+00:00Added an answer on June 18, 2026 at 2:48 am

    ToolTips and other popups exist outside the main visual tree and so can’t use RelativeSource to get to parents. Try instead using the ToolTip’s PlacementTarget property to get to its parent ContentPresenter:

    Content="{Binding RelativeSource={RelativeSource Self}, Path=PlacementTarget.Content}"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am styling a navigation menu using the following css. I have found that
I have a tree in WPF that has no root node, but has defined
I have this css styling for hr element: hr#content { background: url(linie-content.png) no-repeat center
I have a question about styling Icefaces. I have a minimal application that can
I have sitewiode styling of buttons using the html element. For buttons that submit
I have this styling: .content .chapter_text { margin-bottom: 0em; padding: 0.5em; line-height: 1.5em; }
A bit new to styling sheets. I have a div for my site's content.
We have common CSS styling in our organisation that most of the projects use.
I have a problem styling/templating an AccordionItem in the accordion control from the silverlight
Struggling with styling the mouse over for a button ... I have managed to

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.