Reading text off of ((((System.Windows.Documents.Hyperlink)(e.OriginalSource as FrameworkContentElement))))

Experts I need to do get the text off of System.Windows.Documents.Hyperlink on my win form. What do i do ? I am using it in WPF ? So i do the following

((((System.Windows.Documents.Hyperlink)(e.OriginalSource as FrameworkContentElement)))).Text

But get an error saying the get is inaccessible .....
LVL 1
dotnetproAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
jhshuklaConnect With a Mentor Commented:
What's the point of casting plus as-operator? you need only one. Seems like you are more interested in the Hyperlink class. Have you tried NavigateUri?
http://msdn.microsoft.com/en-us/library/system.windows.documents.hyperlink.navigateuri.aspx
0
 
dotnetproAuthor Commented:
that is also coming in as null
0
 
dotnetproAuthor Commented:
I am looking to read the hyperlinked text on my form. So if "Click here" is hyperlink i want to read "Click here" in my code.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
jhshuklaCommented:
I see. I misunderstood your question.
Perhaps you would want to try ContentStart or ContentEnd and corresponding methods.
http://msdn.microsoft.com/en-us/library/system.windows.documents.textpointer_methods.aspx
0
 
dotnetproAuthor Commented:
You know i was able to do this myself. I had to cast the "Tag" property of the HyperLink to one of our custom navigation objects and there by reading a custom property. But i appreciate your help.
0
 
dotnetproAuthor Commented:
The answer was not useful to me at all, but i appreciate the time expert took to answer my question.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.