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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:00:52+00:00 2026-06-15T04:00:52+00:00

My Combobox: <pmControls:pmComboBox Grid.Row=3 Grid.Column=1 Margin=3 SelectedItem={Binding Applicable_For,Mode=Two Way} DisplayMemberPath=Applicable_For SelectedValuePath=Applicable_For> <pmControls:pmComboBoxItem Content=Parcel ></pmControls:pmComboBoxItem>

  • 0

My Combobox:

 <pmControls:pmComboBox Grid.Row="3" Grid.Column="1" Margin="3"  
  SelectedItem="{Binding Applicable_For,Mode=Two Way}" DisplayMemberPath="Applicable_For"
     SelectedValuePath="Applicable_For">

  <pmControls:pmComboBoxItem Content="Parcel" ></pmControls:pmComboBoxItem>
  <pmControls:pmComboBoxItem Content="Property"></pmControls:pmComboBoxItem>

  </pmControls:pmComboBox>

Have Added 2 static items to combobox as parcel and property and want to get these values
using binding .

I have given binding to SelectedItem and my binding field is Applicable_For.

Using above code am getting value as null in Applicable_For.

EDIT: I have added Mode=Two Way for Selected Item which I have forgot before.

But not it getting value as namespace like ‘PropMgmt.Controls.pmComboBoxItem’

Please Help..

  • 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-15T04:00:53+00:00Added an answer on June 15, 2026 at 4:00 am

    Instead of adding static items to combo box you can create a collection for it. for ex. Create class like:

    public class KeyValuePair
    {
        string key;
    
        public string Key
        {
            get { return key; }
            set { key = value; }
        }
        string value;
    
        public string Value
        {
            get { return this.value; }
            set { this.value = value; }
        }      
    
    }
    

    Then in your view model add following code:

            ObservableCollection<KeyValuePair> applicable_For_KeyValues = new ObservableCollection<KeyValuePair>();
    
            KeyValuePair k1 = new KeyValuePair() { Key = "1", Value = "Parcel" };
            KeyValuePair k2 = new KeyValuePair() { Key = "2", Value = "Property" };
    
            applicable_For_KeyValues.Add(k1);
            applicable_For_KeyValues.Add(k2);
    

    Then in xaml add following:

    <pmControls:pmComboBox Grid.Row="3" Grid.Column="1" Margin="3" 
     ItemsSource="{Binding Applicable_For_KeyValues}" 
     SelectedValue="{Binding Applicable_For,Mode=TwoWay}" SelectedValuePath="Value">
                    <pmControls:pmComboBox.ItemTemplate >
                        <DataTemplate>
                            <TextBlock Text="{Binding Value}"></TextBlock>
                        </DataTemplate>
                    </pmControls:pmComboBox.ItemTemplate>        
    
                </pmControls:pmComboBox>
    

    Hope this solve your problem.

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

Sidebar

Related Questions

My ComboBox : <ComboBox SourceUpdated=MyComboBox_SourceUpdated ItemsSource={Binding ...} SelectedValue={Binding Path=SelectedValueMember, NotifyOnSourceUpdated=True} SelectedValuePath=... DisplayMemberPath=... /> And
I have a ComboBox that it looks like this: <ComboBox ItemsSource={Binding JobList} SelectedValue={Binding Job,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}
I am binding a combobox selected index to an integer value (Mode) in my
sample combobox: <DataGridComboBoxColumn Header=Status SelectedItemBinding={Binding status} ItemsSource={Binding status} Width=98.8 /> sourse data on mysql
I have a combobox that is binding to an ObservableCollection of strings in an
I have a ComboBox with two read only values: white fusion and silver fusion.
I have a ComboBox inside of a cell of a DataGridView Row on a
I have ContentControls like ComboBox and TextBox inside of a Grid or a StackPanel.
I have two combobox. I need get some value from first combobox1 after combobox1
I have: ComboBox.DataSource = System.Enum.GetValues(typeof(ImageLayout)); but how do I set the ComboBox.SelectedItem to 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.