-
July 21st, 2015, 09:53 AM
#1
Binding to Images
I have a need to update icons on several grids. They will be either Red(off) or Green(On) controlled by boolean values set from an external device. I was trying to go down the road of Converters. Is this the most efficient way to achieve my results? With my test code I seem to have setup correctly the call into my booltoimage converter, but am missing the boat on how to change the image; how to associate the boolean variable to my image icon? Grid does not display other icon, this is my convert routine.
Code:
if ((bool)value)
return this.GreenIcon.UriSource;
else
return this.RedIcon.UriSource;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|