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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:40:07+00:00 2026-06-04T03:40:07+00:00

I am trying to create an application that tracks JobItems. In the application, the

  • 0

I am trying to create an application that tracks JobItems. In the application, the user clicks on a “New Job” button to create a JobItem. A new window (NewJobWindow) then pops up and the user must fill in information about the Job. A few of the information needed has multiple values. For instance, you can add multiple (string) Business Units within a job Item. What I’ve done is added a listbox for users to add all the business units within it. What I don’t know how to do is bind this listbox of business units so that every time I add an item in it, the Observable Collection BusinessUnits in JobItem gets added the same item when I click the submit button. I need to know how I would do this using databinding. I have already searched Google to look for similar answers but could not find any.

Edit:

This is what I have in my JobItem Class that I need to get updated every time a user is submitting multiple BusinessUnits in the NewJobWindow:

public ObservableCollection<string> BusinessUnit
    {
        get { return businessUnit; }
        set
        {
            if(!BusinessUnit.Equals(value))
            {
                businessUnit = value;
                OnPropertyChanged("BusinessUnit");
            }
        }

    }

This is what the JobWindow looks like in xaml for adding businessunits within the listbox. I created a ValidatingListBox just so I can validate that the user has inserted an item within the list box.:

<Label Grid.Column="0" Grid.Row="5">Business Unit:</Label>
        <my:ValidatingListBox Grid.Column="1" Grid.ColumnSpan="1" Grid.Row="5" Grid.RowSpan="1" x:Name="businessUnitBox" SelectionMode="Multiple" SelectionChanged="ValidatingListBox_SelectionChanged" ItemsSource="{Binding Path=BusinessUnit}" >
        <my:ValidatingListBox.ValidationListener>
                <Binding RelativeSource="{RelativeSource FindAncestor, AncestorType=Window}" Path="BusinessUnit" Mode="TwoWay">
                <Binding.ValidationRules>
                    <my:ListBoxValidationRule ValidatesOnTargetUpdated="True" ></my:ListBoxValidationRule>
                </Binding.ValidationRules>
            </Binding>
        </my:ValidatingListBox.ValidationListener>
    </my:ValidatingListBox>
  • 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-04T03:40:08+00:00Added an answer on June 4, 2026 at 3:40 am

    Binding is very simple:

    <ListBox ItemsSource="{Binding MyCollection}" />  
    

    where MyCollection is a property of ObservableCollection type. You don’t need to add items to ListBox, add them to collection, data binding will do the rest.

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

Sidebar

Related Questions

I am trying to create an application that makes a window (external to the
I'm trying to create an application that uses Google OAuth for login, and then
I am currently trying to make an application that allows the user to create
I'm trying to create an application that maxes out the user's downstream by continuously
I'm trying to create an application that uses the iPhone MapView (under Google Code).
I'm trying to create an application that uses c2dm service. So. First I used
I am currently trying to create an Android application that loops Audio from the
Im trying to create a server/client application that will work on two or more
I'm trying to create a simple Silverlight application that involves parsing a CSV file
I am trying to create a simple Android application that has a ActivityList of

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.