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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:35:36+00:00 2026-06-14T07:35:36+00:00

I have a ComboBox that has a declared ComboBox.Items list (in other words, not

  • 0

I have a ComboBox that has a declared ComboBox.Items list (in other words, not dynamically bound via ItemsSource). I use the ComboBoxItem.Content for the display name and ComboBoxItem.Tag for the corresponding Id as shown below.

How do I get the Tag of the selected item return and not the content? I tried SelectedItemValuePath="Tag", but that does not work.

    <ComboBox Visibility="{Binding Path=ShowOutpatientFields, Converter=   
        {StaticResource   
            boolTovisConverter}}" Grid.Row="5" Grid.Column="2" Margin="0,2,0,2"  
        Text="{Binding Path=NewCase.ServiceType, ValidatesOnDataErrors=true,  
        NotifyOnValidationError=true}" SelectedValuePath="Tag">
          <ComboBox.Items>
             <ComboBoxItem Content="Hospice" Tag="33" />
             <ComboBoxItem Content="Hospital Outpatient" Tag="36" />
             <ComboBoxItem Content="Hospital Inpatient Extension" Tag="128" />
             <ComboBoxItem Content="Maternity" Tag="52" />
          </ComboBox.Items>
    </ComboBox>
  • 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-14T07:35:37+00:00Added an answer on June 14, 2026 at 7:35 am

    If you have this property in your ViewModel class:

     private string _serviceType;
     public string ServiceType
     {
         get { return _serviceType; }
         set { _serviceType = value; }
     }
    

    Of course you can have property of type int and it will be working too.

    Try this binding:

    <ComboBox VerticalAlignment="Center" Margin="0,2,0,2"  
                    SelectedValue="{Binding ServiceType}"
                    SelectedValuePath="Tag">
                <ComboBox.Items>
                    <ComboBoxItem Content="Hospice" Tag="33" />
                    <ComboBoxItem Content="Hospital Outpatient" Tag="36" />
                    <ComboBoxItem Content="Hospital Inpatient Extension" Tag="128" />
                    <ComboBoxItem Content="Maternity" Tag="52" />
                </ComboBox.Items>
            </ComboBox>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ComboBox that has its ItemsSource bound to a static List<CustomSettings> of
I have a ComboBox whose ItemsSource is bound to an ObjectDataProvider that has its
I have a ComboBox that has a bound items source... I've stripped my example
I have a ComboBox that has the SelectedItem bound to the ViewModel. <ComboBox SelectedItem={Binding
I have a WPF containing a dynamically created DataGridComboBoxColumn this has a comboBox that
I have a ComboBox that is bound to a DataSource. I want to dynamically
I have a combobox that has following items inserted public void SetOperationDropDown() { //ByDefault
I have a ComboBox that has its ItemSource and SelectedItem properties bound to a
I have a comboBox that is bound to a list of strings from my
I have a ComboBox that holds a list of StrategyViewModels. The StrategyViewModel has an

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.