Access markup hyperlink Tag property in C# |
Post Reply |
Author | |||
midzi
Newbie Joined: 02 July 2013 Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: 02 July 2013 at 9:09am |
||
Hello, I'm trying to access the Tag property inside the hyperlink click event handler. In VB6 this is easy:
However, when I want to do this in C# like this:
it raises the obvious compilation error:
It is not possible to cast the sender to XtremeMarkup.MarkupHyperlink (as shown in the Help) because this class is not present in the ActiveX Controls package, which I happen to own. Is there any way I can access the Tag property without buying Suite Pro? Best wishes, Mariusz |
|||
csware
Groupie Joined: 08 March 2008 Location: Germany Status: Offline Points: 10 |
Post Options
Thanks(0)
|
||
Hi Mariusz,
You can cast the control first like
Hope it works CS |
|||
Product: Xtreme SuitePro (ActiveX) version 17.2.0
Platform: Windows 10 (64 Bit) Language: Visual Basic 6.0 SP 6a |
|||
midzi
Newbie Joined: 02 July 2013 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
||
Hi CS, Thanks, but unfortunately your solution doesn't work. The cast to Control would work with a regular control event handler but apparently markup controls work differently. MarkupHyperlink is a class derived from MarkupObject and does not inherit from Control. That's why the cast fails. In another post on this forum I found the following example:
This works but is only possible in the Suite Pro edition because the MarkupObject, MarkupRoutedEventArgs, and MarkupHyperlink classes are not included in the Controls package. What I'm trying to do is find a way to access the Tag property without upgrading to Suite Pro. As I found out, it can be done in VB6 (without a cast), so perhaps it is also possible in C#. Best wishes, Mariusz |
|||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |