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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:44:18+00:00 2026-05-12T08:44:18+00:00

I was working with the ComboBox control and couldn’t get the SelectedItem to be

  • 0

I was working with the ComboBox control and couldn’t get the SelectedItem to be set from the property on my viewmodel. Here is the control definition:

<ComboBox x:Name="jobEmployee" Grid.Column="1" Grid.Row="2" 
    Margin="4" HorizontalAlignment="Left" Width="150"
    SelectedItem="{Binding Path=EditingJob.Employee, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
    ItemsSource="{Binding Path=Employees, Mode=OneWay}"
    DisplayMemberPath="FullName"/>

I had another Combobox control that worked jut fine. The difference between one that would set the SelectedItem and the one that wouldn’t was the order of the attribute definition. Here is the working control definition:

<ComboBox x:Name="jobEmployee" Grid.Column="1" Grid.Row="2" 
    Margin="4" HorizontalAlignment="Left" Width="150"
    ItemsSource="{Binding Path=Employees, Mode=OneWay}"
    SelectedItem="{Binding Path=EditingJob.Employee, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
    DisplayMemberPath="FullName"/>

The difference between the 2 is that the ItemsSource is defined before the SelectedItem on the working one which leads me to believe that in this case at least, the attribute definition order matters. Am I missing something or have others found this to be true? Has it been documented anywhere?

  • 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-12T08:44:18+00:00Added an answer on May 12, 2026 at 8:44 am

    Yes order can matter. Consider that XAML reading involves the creation of objects and the assignment of values to the properties of these objects. Its not possible to assign property values at the same time, clearly one property is going to be assigned followed by another and then another until all properties are assigned.

    Since assigning properties in some objects results in side-effects and other code running the order of assigning those properties can impact the result. This of course is a bad thing.

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

Sidebar

Related Questions

I have a user control with a ComboBox and a TextBox. Everything is working
I am trying to get a dojo comboBox working in Zend, with the following
Hey guys. I'm working in WinForms and trying to create a ComboBox control that
I'm working on a custom control that internally uses a ComboBox. My problem is
I am Working in C# winform to load values for a combobox from a
I'm working with a combobox in a Swing-based application, and I'm having a hard
I'm working on populating a combobox in visual studio 2005 using vb and I'm
I have a JSON data store used for a combobox selection which is working
I create a combobox in a class and want to set the selected value
I have a form, in that I have user control(for displaying member name with

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.