Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Clickable tooltip

Clickable tooltip

Scheduled Pinned Locked Moved WPF
question
8 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John Underhill
    wrote on last edited by
    #1

    I am making a custom tooltip control, (derived ftom tooltip), and wondering if there is some simple way to make the tip clickable, (url and close button). I have managed to 'fake' it, using mouse capture and previewmousemove, but wondering if there was an easier way? Thanks, j

    B 1 Reply Last reply
    0
    • J John Underhill

      I am making a custom tooltip control, (derived ftom tooltip), and wondering if there is some simple way to make the tip clickable, (url and close button). I have managed to 'fake' it, using mouse capture and previewmousemove, but wondering if there was an easier way? Thanks, j

      B Offline
      B Offline
      BechBej
      wrote on last edited by
      #2

      You can use a button that you apply a tool tip control on it as a control template

      J 1 Reply Last reply
      0
      • B BechBej

        You can use a button that you apply a tool tip control on it as a control template

        J Offline
        J Offline
        John Underhill
        wrote on last edited by
        #3

        If only it were that easy.. I have tried deriving the control from other elements, but if you use the tooltip in a standard way, (as below), it does not work correctly. I have managed to get this working using capture and manipulating mouse input, good enough for now unless another solution becomes available.. thanks

                <Button.ToolTip>
                    <vht:vhToolTip HasDropShadow="True"
                                   Opacity="0.9" 
                                   Header="Test Header: Tip 3" 
                                   Hyperlink="http://www.the-noc.net" 
                                   Text="this is just a bunch of tooltip text" 
                                   ImageSource="/Images/13.ico" 
                                   HasCloseButton="True"
                                   HyperlinkClicked="vhToolTip\_HyperlinkClicked"/>
        
                </Button.ToolTip>
            </Button>
        
        P 1 Reply Last reply
        0
        • J John Underhill

          If only it were that easy.. I have tried deriving the control from other elements, but if you use the tooltip in a standard way, (as below), it does not work correctly. I have managed to get this working using capture and manipulating mouse input, good enough for now unless another solution becomes available.. thanks

                  <Button.ToolTip>
                      <vht:vhToolTip HasDropShadow="True"
                                     Opacity="0.9" 
                                     Header="Test Header: Tip 3" 
                                     Hyperlink="http://www.the-noc.net" 
                                     Text="this is just a bunch of tooltip text" 
                                     ImageSource="/Images/13.ico" 
                                     HasCloseButton="True"
                                     HyperlinkClicked="vhToolTip\_HyperlinkClicked"/>
          
                  </Button.ToolTip>
              </Button>
          
          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          If I were you, I'd look at substituting this by using the AdornerLayer and creating a mocked up tooltip that gives you the elements you want.

          "WPF has many lovers. It's a veritable porn star!" - Josh Smith

          As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

          My blog | My articles | MoXAML PowerToys | Onyx

          J 1 Reply Last reply
          0
          • P Pete OHanlon

            If I were you, I'd look at substituting this by using the AdornerLayer and creating a mocked up tooltip that gives you the elements you want.

            "WPF has many lovers. It's a veritable porn star!" - Josh Smith

            As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

            My blog | My articles | MoXAML PowerToys | Onyx

            J Offline
            J Offline
            John Underhill
            wrote on last edited by
            #5

            Hey Pete, Do you mean scrap the custom control all together?

            P 1 Reply Last reply
            0
            • J John Underhill

              Hey Pete, Do you mean scrap the custom control all together?

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #6

              Not quite - I mean show your control in the AdornerLayer in place of showing the ToolTip.

              "WPF has many lovers. It's a veritable porn star!" - Josh Smith

              As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

              My blog | My articles | MoXAML PowerToys | Onyx

              J 1 Reply Last reply
              0
              • P Pete OHanlon

                Not quite - I mean show your control in the AdornerLayer in place of showing the ToolTip.

                "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                My blog | My articles | MoXAML PowerToys | Onyx

                J Offline
                J Offline
                John Underhill
                wrote on last edited by
                #7

                That's a thought.. I'll try it out thanks

                P 1 Reply Last reply
                0
                • J John Underhill

                  That's a thought.. I'll try it out thanks

                  P Offline
                  P Offline
                  Pete OHanlon
                  wrote on last edited by
                  #8

                  Good luck. Let me know how you're getting on.

                  "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                  As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                  My blog | My articles | MoXAML PowerToys | Onyx

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups