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 9269235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:04:02+00:00 2026-06-18T15:04:02+00:00

I have a UserData class instance containing a user’s settings and other information. Since

  • 0

I have a UserData class instance containing a user’s settings and other information. Since it has settings for different parts of the application, it should be easily accessible anywhere. For this reason it’s a static property on the App class.

I need a menu where some checkable items are two-way bound to some of the (Boolean, obviously) settings so that the menu item always shows if the setting is on/off and can be used to toggle it.

Since the UserData instance is a static property, it doesn’t natively work with two-way binding.

What would be the best way to solve this situation? Is there a way that doesn’t require instantiating throwaway objects or manually creating a dependency property for each and every setting individually?

  • 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-18T15:04:03+00:00Added an answer on June 18, 2026 at 3:04 pm

    You can’t bind directly to the static property itself, but you can use the value of a static property as a binding source and then bind to its properties just as you would any other object instance. There are a few variations of what your Binding will look like but if you want to do a bunch of properties on the same object you can use the static object as a DataContext (which is One-Way) and then normal bindings on the MenuItems:

    <Menu DataContext="{Binding Source={x:Static App.UserData}}">
        <MenuItem Header="1" IsChecked="{Binding SomeUserProperty}"/>
        <MenuItem Header="2" IsChecked="{Binding Property2}"/>
    </Menu>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class that has an instance property on it like below Public
i have one problem with handling list,i have three class named as UserInf,userData,userProcess,i created
I have a table of userdata that includes user ID and category IDs. I
i have form with user data to input and javascript ajax to send information
I have a simple web application which lets the user upload local user data
I have a client-server application that send user data to the cloud (Amazon EC2
I have a Session scoped bean @SessionScoped public class UserData implements Serializable { private
i have list of items of following class: public class MonthlyConsumption : UserData {
I have an application where Servlet has a method called Update(ReqIn, ReqOut) . I
I have this singleton: UserData.h @interface UserData : NSObject { User *user; } +

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.