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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:59:06+00:00 2026-05-31T07:59:06+00:00

I am trying to build a small application with a combobox and the issue

  • 0

I am trying to build a small application with a combobox and the issue is that the items are not getting updated in it properly, sometimes 2 items sometime 4 items are only getting visible however the items count is getting updated properly. Following is the xaml code:

                <ComboBox Name="NumbersCombo" Width="118">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Title}" />
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>

Following is the code for itemssource on page load, where con.Numbers is dictionary of string and Numbers class, hence Values are sent for attachment:

NumbersCombo.ItemsSource = con.Numbers.Values

Following is the code for adding new items to combobox:

Dim temp As New BSPLib.ContactLib.ContactCon(con.prime.Conid, False)
con.Numbers.Add(temp.ConRowID, temp)
NumbersCombo.ItemsSource = con.Numbers.Values
TestLabel1.Content = NumbersCombo.Items.Count

Following is the code for the class:

Public Class ContactCon
        Property ConId As String
        Property ConRowID As String
        Property Title As String
        Property Mob1 As String
        Property Mob2 As String
        Property Land1 As String
        Property Land2 As String
        Property Email1 As String
        Property Email2 As String
        Property Fax1 As String
        Property Fax2 As String
        Property Primary As Boolean
        Public Sub New()
        End Sub

        Public Sub New(ByVal contactID As String, ByVal primarynumbers As Boolean)
            ConId = contactID
            ConRowID = contactID & "-" & Now.ToString
            If primarynumbers = True Then
                Title = "Primary Details"
            Else
                Title = "Additional Contact Numbers"
            End If
            Mob1 = ""
            Mob2 = ""
            Land1 = ""
            Land2 = ""
            Email1 = ""
            Email2 = ""
            Fax1 = ""
            Fax2 = ""
            Primary = primarynumbers
        End Sub
    End Class

    Public Class Contact
        Public prime As ContactPrime
        Public addrs As Dictionary(Of String, ContactAddress)
        Public Numbers As Dictionary(Of String, ContactCon)

        Public Sub New()
            Numbers = New Dictionary(Of String, ContactCon)

            'assigning initial ids and values
            Dim t As New ContactCon(prime.Conid, vbYes)
            Numbers.Add(t.ConRowID, t) 'Primary Contact Number
        End Sub

In simple, the gui of combo box is not showing the items but the items count is correct, could you please tell where I have gone wrong. Thank you.

  • 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-31T07:59:07+00:00Added an answer on May 31, 2026 at 7:59 am

    If you want the combo box to be updated automatically when a particular ContactCon object or the collection of ContactCon objects changes then the ContactCon class needs to implement INotifyPropertyChanged and you need to set the ItemSource to a collection class that implements INotifyCollectionChanged (This means that you only have to set the ItemSource once). You can find out how to implement an observable dictionary in the answers section of the following question.

    Making these changes will also fix the synchronisation problems you are seeing.

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

Sidebar

Related Questions

I'm working on a small picture application. That I'm trying to do is build
I am trying to build a small application that logins into a server and
I'm trying to build a small inventory application in Java, that switches views (or
I'm trying to build a small program that hosts vst effects and I would
I am trying build small webcam chat (web application). I searched on google and
I am trying to build a small application in C# which should start/stop an
I'm trying to build a small Java app for connecting to an application called
i am trying to build a small email worker that sends my emails. The
I am trying to build a small silverlight application to support some midi files
I am trying to build a small useful application with twitter. I will publish

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.