Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8458929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:12:39+00:00 2026-06-10T13:12:39+00:00

I am designing GUI for my project. What I need to do is changing

  • 0

I am designing GUI for my project.
What I need to do is changing the color of a label depending on a boolean in a binding source. But the problem is that I need to assign a Color to the label wheres binding source doesn’t have this(I don’t want a Color property in binding source).

How can I handle to make label red when bool is true otherwise black?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:12:41+00:00Added an answer on June 10, 2026 at 1:12 pm

    Since you cannot bind them directly, you have to create an extra property on either side. Either you add a Color property in the (business) object (which you said you didn’t want), so that leaves adding a property on the form/control which you bind to the property on your (business) object.

    UPDATE

    If you want to add a property to the form to which you can bind, add the following.

    public bool MyPropertyToBindTo {
        get { return _myLabel.Color == Color.Red; }
        set { _myLabel.Color = value ? Color.Red : Color.Black; }
    }
    

    Now you can bind the business-object-property to this property, and it should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a current project, we're designing a client desktop application that parses text files
I'm in the process of designing a Java GUI driven application that runs a
I am designing a GUI that has the following basic idea (similarly modeled after
I am working on designing a GUI for a software that will be written
I'm designing a really simple GUI but without any luck. Basically the outer layout
I am currently designing a GUI that allows the user to define some logic.
I am charged with designing a system composed of 1) a GUI that handles
Okay so I'm designing a gui. Typically I've done GUIs that take a certain
Designing forms has always been fun, but getting them to send email on the
Im designing a website, and often I need to present information in a nice

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.