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. WPF - Getting target for hyperlink?

WPF - Getting target for hyperlink?

Scheduled Pinned Locked Moved WPF
questionwpfhelpcsharpcom
2 Posts 1 Posters 0 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.
  • D Offline
    D Offline
    David Veeneman
    wrote on last edited by
    #1

    How do I get the target for a WPF hyperlink in XAML? I have a listbox that contains hyperlinks. The listbox is bound to a ViewModel.MyHyperlinks collection. ViewModel also has several ICommands exposed as properties. When I click on a hyperlink, it should invoke one of these ICommands. I want to specify which ICommand in a property of the MyHyperlink class. I tried creating a resource to hold the name of the ICommand, but that isn't working. So, my question is: How do I specify an I Command to run in a hyperlink I am loading from an object or a data record? I have created a simple demo project that shows the problem I am having. It can be downloaded here[^] Thanks for your help!

    David Veeneman www.veeneman.com

    D 1 Reply Last reply
    0
    • D David Veeneman

      How do I get the target for a WPF hyperlink in XAML? I have a listbox that contains hyperlinks. The listbox is bound to a ViewModel.MyHyperlinks collection. ViewModel also has several ICommands exposed as properties. When I click on a hyperlink, it should invoke one of these ICommands. I want to specify which ICommand in a property of the MyHyperlink class. I tried creating a resource to hold the name of the ICommand, but that isn't working. So, my question is: How do I specify an I Command to run in a hyperlink I am loading from an object or a data record? I have created a simple demo project that shows the problem I am having. It can be downloaded here[^] Thanks for your help!

      David Veeneman www.veeneman.com

      D Offline
      D Offline
      David Veeneman
      wrote on last edited by
      #2

      I found my answer and wrote it up as a Code Project article. Hopefully, it will help other people down the road.

      David Veeneman www.veeneman.com

      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