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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:58:20+00:00 2026-06-18T06:58:20+00:00

I have some wpf combobox (xaml): <ComboBox ItemsSource={Binding Path=NonPositionedConcentrators} SelectedValue={Binding Path=SelectedNonPositionedConcentrator} DisplayMemberPath=SerialNumber /> SelectedNonPositionedConcentrator

  • 0

I have some wpf combobox (xaml):

<ComboBox ItemsSource="{Binding Path=NonPositionedConcentrators}"
          SelectedValue="{Binding Path=SelectedNonPositionedConcentrator}"
          DisplayMemberPath="SerialNumber" />

SelectedNonPositionedConcentrator – is a Concentrator type. Something like:

class Concentrator
{
...
public string SerialNumber {...}
...
public override ToString{ return "Some needed text..."; }
}

NonPositionedConcentrators – the list of Concentrator objects.

So, in application I see the combobox with serial numbers of NonPositionedConcentrators (because of DisplayMemberPath="SerialNumber"), but when I select something, then selected item shonw as "Some needed text..." , see the image:

enter image description here

I have tried SelectedValuePath=”SerialNumber”, but it doesn’t work…
And I can’t remove this – public override ToString{ return "Some needed text..."; }, becase I need…

  • 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-18T06:58:21+00:00Added an answer on June 18, 2026 at 6:58 am

    It looks like you have a custom ComboBox template which may be causing your problem. If it is using a TextBlock or ContentPresenter for the display of the selected item which is just binding the SelectedItem property and not pulling in any templates or other settings you would just get the ToString value no matter what. A properly constructed template will have something like what the default template uses at this spot:

    <ContentPresenter ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
        Content="{TemplateBinding SelectionBoxItem}" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}"
        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ComboBox in my wpf application. It's ItemsSource is binded to some
I have a WPF combobox <ComboBox Name=cmbExpression IsEditable=True/> Now I have written some text
I have a WPF combobox <ComboBox x:Name=tCountry HorizontalAlignment=Left Margin=96,151,0,0 VerticalAlignment=Top Width=146 TabIndex=6/> and some
I have a ComboBox on a WPF window that is giving me some heartache,
I have a WPF application containing several ComboBoxes . The ItemsSource of some of
I have a WPF / XAML Window that contains a ComboBox that is giving
I have a wpf combobox with some custom items. When the dropdown button is
I'm doing some stuff in WPF. I have a ComboBox with many Types .
I have seen this post: WPF ComboBox: background color when disabled and some others...
I have a WPF ComboBox and am using MVVM to bind the ItemsSource and

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.