[Unity] Working with tags
I have a button I have defined as follows:
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?
Code: Select all
<Button x:Name="myButton" Tag="Test!">
<Image Source="test.png" />
</Button>
Re: [Unity] Working with tags
Take your BaseComponent and call the AsString method on it.
Re: [Unity] Working with tags
I guess I need to start looking into this As*() thing. Thanks!
Who is online
Users browsing this forum: Google [Bot] and 2 guests