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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:58:26+00:00 2026-05-18T10:58:26+00:00

So I have several comboboxes in my WPF application that don’t change the selection

  • 0

So I have several comboboxes in my WPF application that don’t change the selection when a user clicks on the text of a combobox item. In order to select a particular item you have to click to the right or left of the text. I have another combobox that selects just fine when the text is clicked. The only difference between the two is databinding. The comboboxes that don’t select when the text is clicked are databound to an ObservableCollection of one type or another. The combobox that works has manually inserted, static values.

I’ve searched the issue extensively and I can’t seem to find anyone else who has had this issue or anything remotely similar. I’m not setting any weird properties.

Here is the code for one of the problematic comboboxes:

<ComboBox HorizontalAlignment="Left" Margin="40,160,0,0" VerticalAlignment="Top" Width="132" ItemsSource="{Binding Path=Systems}" SelectedItem="{Binding Path=System}" SelectedIndex="0">
     <ComboBox.ItemTemplate>
         <DataTemplate>
             <ComboBoxItem Content="{Binding Path=Name}"/>
         </DataTemplate>
     </ComboBox.ItemTemplate>
 </ComboBox>

Here is a video of the behavior:

http://www.youtube.com/watch?v=D0r1N1ghw-k

  • 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-18T10:58:27+00:00Added an answer on May 18, 2026 at 10:58 am

    enter code hereSuppose my Combobox is defind as below

     <ComboBox Name="cmb" Width="200" Height="20" DisplayMemberPath="PersonName" SelectedValuePath="PersonID">
    
        </ComboBox>
    

    please notice , i have removed the itemtemplate part

    and my model is as below

    public class Person
    {
        public string PersonName { get; set; }
    
        public string PersonID { get; set; }
    }
    

    And my binding is in code behind , this step is not necessary , you can do it in the xaml , iam just checking quickly so much dirty code

     public List<Person> source = new List<Person>();
        public MainWindow()
        {
            InitializeComponent();
    
    
            for (int i = 0; i < 20; i++)
            {
                source.Add(new Person() { PersonID = i.ToString(), PersonName = "Sau" + i.ToString() });
            }
            cmb.ItemsSource = source;
            this.DataContext = this;
        }
    

    so if you run this sample , you will see you can select the value when you click on the text itself.

    it’s content property which causes some problem but i am not 100% sure on this.

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

Sidebar

Related Questions

I have a custom control that has several text boxes and combo boxes in
I have a form that contains several comboxes that their data is coming from
I'm trying to bind multiple ComboBox's to a common source collection and enforce that
My application has a tree with a custom item renderer, which depending on the
I have several questions about the Android in-app billing, as I cannot find what
I have several different sites in different hosts and I use the same JS
I am asking for a programming approach. This is my problem: I have a
I know there are several ways to do it, but I would like to
I have following XAML (simplified, no ending tags): <Window Name=myWindow DataContext={Binding ElementName=myWindow} > <DockPanel>
When creating dynamic ajax controls you may experience a pre-render issue on postbacks. You

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.