Basp
Topic Author
Posts: 22
Joined: 08 May 2014, 10:09

[Unity] Working with tags

27 Jun 2014, 22:47

I have a button I have defined as follows:
<Button x:Name="myButton" Tag="Test!">
                                <Image Source="test.png" />
</Button>
In code, I call the GetTag() method for that button, and I receive a Noesis.BaseComponent. This object has no members, and I can't find any way to cast it to a string or otherwise get the value "Test!" from it as defined in the XAML. How do I get a string value from a tag like this?
 
wckdspn
Posts: 67
Joined: 18 Aug 2012, 23:14

Re: [Unity] Working with tags

27 Jun 2014, 22:52

Take your BaseComponent and call the AsString method on it.
 
Basp
Topic Author
Posts: 22
Joined: 08 May 2014, 10:09

Re: [Unity] Working with tags

29 Jun 2014, 10:04

I guess I need to start looking into this As*() thing. Thanks!

Who is online

Users browsing this forum: jsantos, Noa3 and 2 guests