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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:14:13+00:00 2026-05-28T01:14:13+00:00

I have a combobox with about 20 items. I want to associate up to

  • 0

I have a combobox with about 20 items. I want to associate up to 5 attributes with each ComboBoxItem such as color, price, shipping weight, etc.

I want to store all these attributes in the xaml file and retrieve them when item is selected in C# code.

How best do I do this? Is storing everything in Tag and parse the Tag string the best way? Thanks.

 <ComboBoxItem Content="Shirt" Tag="Red;14;2"></ComboBoxItem>
  • 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-28T01:14:14+00:00Added an answer on May 28, 2026 at 1:14 am

    You can store anything in the tag, if you want more type safetry create an object:

    <ComboBoxItem>
        <ComboBoxItem.Tag>
            <local:Attributes Color="Red" Min="2" Max="14"/>
        <ComboBoxItem.Tag>
    <ComboBoxItem>
    

    But even better yet you should not create the items on your own but just have an items collection and bind/data template it using the ComboBox.ItemsSource and ItemTemplate, then you can store that with the item.

    The ComboBox.SelectedItem will then directly be such an item with all the attributes you need.

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

Sidebar

Related Questions

This is what I'm talking about: http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ComboBox/ComboBox.aspx basically I want to have a drop
I have a ComboBox in Flex with about 20 items. How do I display
I have a combobox in a view that receives information about application state changes,
I have a combobox whose value I want to use with a SQL WHERE
I have a combobox in a form and a button. I want to add
I want to display a myItem.title and myItem.url per each item in the comboBox.ItemsSource
Suppose I have a combobox where items are binded to an array of strings.
I have a ComboBox with its Items property bound to a collection of objects.
I have comboBox component and i am adding items like comboBox1.Items.Add(Item1) . But i
I have a ComboBox setup with 4 items, with indexes ranging from 0 to

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.