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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:09:57+00:00 2026-05-13T17:09:57+00:00

<ComboBox Height=23 Margin=52,64,33,0 Name=comboBox1 IsSynchronizedWithCurrentItem=True IsEditable=True DisplayMemberPath=Value SelectedItem={Binding Path=Number, Mode=TwoWay} /> public class Number

  • 0
<ComboBox Height="23" Margin="52,64,33,0" Name="comboBox1"  
              IsSynchronizedWithCurrentItem="True"
              IsEditable="True"
              DisplayMemberPath="Value" 
              SelectedItem="{Binding Path=Number, Mode=TwoWay}"
              />

public class Number : INotifyPropertyChanged
    {
        private string value;
        public string Value
        {
            get
            {
                return value;
            }
        set
        {
            this.value = value;
            this.PropertyChanged(this, new PropertyChangedEventArgs("Value"));
        }
    }

    #region INotifyPropertyChanged Members

    public event PropertyChangedEventHandler PropertyChanged = delegate { };

    #endregion
}

 comboBox1.ItemsSource = new Number[] { new Number() { Value = "One" },
                                                   new Number() { Value = "Two" },
                                                   new Number() { Value = "Three" }};

My binded data set is not modifying when i am editing combobox text.
ie., target to source binding is not happening.

  • 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-13T17:09:57+00:00Added an answer on May 13, 2026 at 5:09 pm

    adding to what Josh advises….
    first, you should think about using a diff variable name then “value”,
    second, you shouldnt fire the “PropertyChanged” event if the value is not changing.

    add this to the property setter….

    if ( value != this.value )
    {
    
    }
    

    third, your not binding to an instance of your data, your binding to your class type

    SelectedItem="{Binding Path=Number, Mode=TwoWay}"
    

    fourth, you should set the ItemSource in your combobox to an ObservableCollection< Number >

    lastly, you should check out Bea’s great blog entry about debugging databinding. She has many great examples.

    ok, so now that i have access to my compiler…. here is what you need to do.
    Firstly, WHERE is the “Number” property located that you are binding to? you can not bind back to the list that is the source of your combobox.

    you need to add an ElementName to the binding, or set the DataContext to the object that contains the Number property. Second, that Number property, wherever it might be, needs to be either a Notify or a DependencyProperty.
    for example, your Window class would look like this…..

       public partial class Window1 : Window
       {
          public Number Number
          {
             get { return (Number)GetValue(ValueProperty); }
             set { SetValue(ValueProperty, value); }
          }
    
          public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(Number),typeof(Window1), new UIPropertyMetadata(null));
    
       }
    

    and your window.xaml would look like this…

    <Window x:Class="testapp.Window1"
              x:Name="stuff"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Window1" Height="300" Width="300">
        <Grid>
            <ComboBox Height="23" Margin="52,64,33,0" Name="comboBox1"  
                  IsEditable="True"
                  DisplayMemberPath="Value" 
                  SelectedItem="{Binding ElementName=stuff, Path=Number, Mode=TwoWay}"
            />
        </Grid>
    </Window>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 287k
  • Answers 287k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I see two solutions: When you modify an item have… May 13, 2026 at 5:10 pm
  • Editorial Team
    Editorial Team added an answer Do not wipe the DB. When it comes to anything… May 13, 2026 at 5:10 pm
  • Editorial Team
    Editorial Team added an answer wget --page-requisites This option causes Wget to download all the… May 13, 2026 at 5:10 pm

Related Questions

i use devexpress comboBoxEdit component in my WPF app. I assign values for it
I don't believe this: Just built a very simple form with one combobox, when
I want my WPF ComboBox's ItemsSource property to be bound to MyListObject's MyList property.
Trying to determine if it is possible to bind the SelectedValue of a ComboBox
Here's my binding source object: Public Class MyListObject Private _mylist As New ObservableCollection(Of String)

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.