Page 1 of 1

[Unity] Working with tags

Posted: 27 Jun 2014, 22:47
by Basp
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?

Re: [Unity] Working with tags

Posted: 27 Jun 2014, 22:52
by wckdspn
Take your BaseComponent and call the AsString method on it.

Re: [Unity] Working with tags

Posted: 29 Jun 2014, 10:04
by Basp
I guess I need to start looking into this As*() thing. Thanks!