Author Topic: Changing Background Colors of Buttons  (Read 1653 times)

Chassmain

  • Newbie
  • *
  • Posts: 1
    • View Profile
Changing Background Colors of Buttons
« on: September 06, 2012, 07:13:19 am »
I'm starting to work on a Metro inspired design shown in the image attached.

What I'd like to do is have a home screen with live updating tiles to reflect the status of the various buttons.  I.e., if any lights are on I want the lighting button background to be yellow (gray otherwise) or if the security system is in an alarm state that button background should be red. 

What's the easiest way to accomplish this?

As an example, for the lighting button, I'd like to poll the status of all lights in the house and if a single one is on make that background yellow.

Thanks so much for your help!

iostream212

  • Sr. Member
  • ****
  • Posts: 459
    • View Profile
Re: Changing Background Colors of Buttons
« Reply #1 on: September 06, 2012, 10:11:20 am »
You need to bind the control to the device. For ex: Change the security system button to a boolean control. Then set the binding of the boolean control to the arm status of alarm system. You can specify different colors/images for true/ false. You could also use a image list and bind all arm up states to a specific image/color.
I always wanted to be somebody. In retrospect, I think I should have been more specific.