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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:15:33+00:00 2026-06-08T17:15:33+00:00

I’m working on a C# Metro style app for Windows 8, and I’m having

  • 0

I’m working on a C# Metro style app for Windows 8, and I’m having a problem getting my data bound combo box to update when the source data changes.

Here’s the data source:

public class Range
{
    public string range_name { get; set; }
    public string range_description { get; set; }
    public int min { get; set; }
    public int max { get; set; }
}

static List<Range> ranges = new List<Range>
{
    new Range { range_name = "Foo", range_description = "Foo: (0-10)", min = 0, max = 10},
    new Range { range_name = "Bar", range_description = "Bar: (5-15)", min = 5, max = 15},
    new Range { range_name = "Baz", range_description = "Baz: (10-20)", min = 10, max = 20},
    new Range { range_name = "Custom", range_description = "Custom: (0-20)", min = 0, max = 20}
};

And the combo box:

<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
    <ComboBox Name="combo_range" ItemsSource="{Binding Path=Range}" DisplayMemberPath="range_description" SelectedValuePath="range_name" SelectedValue="{Binding Path=Range}" SelectionChanged="combo_range_SelectionChanged"/>
</Grid>

The user can manipulate the min/max range range of the ‘custom’ range in the app, but the combo box only updates when I change away from that record and then change back to ‘custom’.

What do I need to do to force the combo box to update in real time when the source data changes?

Thanks

  • 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-08T17:15:34+00:00Added an answer on June 8, 2026 at 5:15 pm

    Try implementing INotifyPropertyChanged in your Range class:

    public class Range : INotifyPropertyChanged
    {
        // Declare the event
        public event PropertyChangedEventHandler PropertyChanged;
        private string _range_name;
        private string _range_description;
        private int _min;
        private int _max;
    
        public string range_name
        {
            get { return this._range_name; }
            set
            {
                _range_name = value;
                OnPropertyChanged("range_name");  
            }  // Call OnPropertyChanged whenever the property is updated
        }
        public string range_description
        {
            get { return this._range_description; }
            set
            {
                _range_description = value;
                OnPropertyChanged("range_description");
            }
        }
        public int min
        {
            get { return this._min; }
            set
            {
                _min=value;
                OnPropertyChanged("min");
            }
        }
        public int max
        {
            get { return this._max; }
            set
            {
                _max = value;
                OnPropertyChanged("max");
            }
        }
    
        // Create the OnPropertyChanged method to raise the event
        protected void OnPropertyChanged(string name)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(name));
            }
        }
    }
    

    Hope it helps 😉

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am currently running into a problem where an element is coming back from
I want to construct a data frame in an Rcpp function, but when I
I am writing an app with both english and french support. The app requests
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I am using Paperclip to handle profile photo uploads in my app. They upload
I'm working with an upstream system that sometimes sends me text destined for HTML/XML

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.