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

  • Home
  • SEARCH
  • 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 7585021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:04:17+00:00 2026-05-30T19:04:17+00:00

I got a settings class (in a ownmade subfolder etc (in Visual studio)) it

  • 0

I got a “settings” class (in a ownmade subfolder “etc” (in Visual studio)) it has a Boolean propertie named “boobackcolorred”(value = TRUE in the first form it puts it to true). Now I am making a WPF window for my settings and I want to use a checkbox where you can change the value of the boalean. I want to do this in the “XAML” way.(I can do it by making the event checked & unchecked but I don t want to do it that way.)

settings.cs: (in the “etc” folder I created in VS)

  class settings
    {

        public static Boolean boobackcolorred{ get; set; }
        ... // some extra code that does nothing with this, some xml reading and saving but doesn t matter for this issue.
    }

Now I am trying to do this with this xaml checkbox

 <CheckBox Content="Red Background?" Name="chbbackgroundred" IsChecked="{Binding etc.settings.boobackcolorred,Mode=TwoWay}" ></CheckBox>

OFC this isn t going to work I tried many ways of getting this to work. tried to include stuff like this:

xmlns:settings="clr-namespace:etc.myapp.settings"

also tried to bind the datacontext of the grid where the checkbox is in but no luck.

I know this can t be hard. However the answer will be greatly appreciated.

PS: it should be twoway binded so if unchecked the static boolean becomes false.

  • 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-05-30T19:04:18+00:00Added an answer on May 30, 2026 at 7:04 pm

    The problem is that it’s a static property.
    Possible workaround in the answer here:

    Binding to static property

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

Sidebar

Related Questions

I've got a class that I'm using as a settings class that is serialized
I've got a settings object for my app that has two collections in it.
I've got an ASMX webservice as a separate project in Visual Studio 2005. In
I've got a shared class ( static in C#) which mostly carries some settings
I'm trying to create my own class template for Visual Studio called Public Class.
I've got a model similar to this: class Product(models.Model): third_party_id = models.CharField(max_length=64, blank=False, unique=True)
I've got application settings working just fine. However, I'd like to be able to
I've got the following settings in my postgres conf: log_destination = 'stderr' redirect_stderr =
I've got some questions about two ways to save settings in the web.config. Appsettings
I've got a function creating some XmlDocument: public string CreateOutputXmlString(ICollection<Field> fields) { XmlWriterSettings settings

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.