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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:19:57+00:00 2026-05-31T13:19:57+00:00

I have a strange issue when binding a combobox in a WPF window. I

  • 0

I have a strange issue when binding a combobox in a WPF window.

I am loading a List object, to populate the combobox, through it’s .ItemsSource, on Window Load, however, it does not populate.

At least, not until the arrow is clicked on. Once the arrow is clicked on, the window freezes up, and after a minute or so, the 4000+ records are displayed in it.

Now, the list gets loaded, however, when I click on the combobox it takes awhile for it to render, so how can I show a waitcursor while it is rendering the list?

Here’s the Xaml for it:

<ComboBox Grid.Column="1" 
                      HorizontalAlignment="Stretch" Margin="3" Name="tUser" VerticalAlignment="Stretch"
                      DisplayMemberPath="UsersName" SelectedValuePath="UserID" SelectedValue="0"/>

And the code-behind is:

Private Sub CreateTask_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
    Using New WaitCursor
        _LA.Show()
        Me.tOrder.ItemsSource = GetOrderList()
        Me.tUser.ItemsSource = GetUserList()
        _LA.Hide()
    End Using
End Sub

Private Function GetUserList() As List(Of UserTyping)
    Dim _Qry As New List(Of UserTyping)
    Using db As New DataAccess
        With db
            .QueryType = CmdType.InlineSQL
            .Query = "Select 0 As UserID, '-Select User-' As UsersName Union All Select userID As UserID, userFullName As UsersName From vwSelectUser"
            Using _Results = .GetResults()
                If _Results IsNot Nothing Then
                    If _Results IsNot Nothing Then
                        _Qry = (From row In _Results.Cast(Of DbDataRecord)()
                                    Select New UserTyping() With {
                                        .UserID = Common.IsNull(Of Long)(row, 0, 0),
                                        .UsersName = Common.IsNull(Of String)(row, 1, String.Empty)
                                        }).ToList()
                    Else
                        _Qry = New List(Of UserTyping)
                    End If
                End If
            End Using
        End With
    End Using
    Return _Qry
    _Qry.Clear()
End Function
Partial Public Class UserTyping
    Public Property UserID As Long
    Public Property UsersName As String
End Class
  • 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-31T13:19:57+00:00Added an answer on May 31, 2026 at 1:19 pm

    I’m not sure if there’s a better way, but…

    If you want to avoid waiting when you open the ComboBox for the first time when it has many items, you can set ComboBox.IsDropDownOpen to True and back to False.

    Edit:
    A little bit of research turned up VirtualizingStackPanel. Basically, your XAML will look like this:

    <ComboBox>
        <ComboBox.ItemsPanel>
            <ItemsPanelTemplate>
                <VirtualizingStackPanel />
            </ItemsPanelTemplate>
        </ComboBox.ItemsPanel>
    </ComboBox>
    

    I was able to view a ComboBox with 40k numbers instantly.

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

Sidebar

Related Questions

Hi guys I have a strange issue. I am trying to get list of
I have a strange issue where I'm scrolling through a paged UIScrollView which displays
I have a strange issue: I am using SPContext.Current.Web in a .aspx page, but
I have this strange issue with my web app. You see, I'm using jQuery
I have a strange issue (at least for me :)) with the MySQL's locking
I have a strange issue that has arisen recently: Whenever I enter text, even
I have a really strange issue. I am working on a Java SWING application
I have a very strange issue on my hands. I have two IIS websites
I am facing a very strange issue. I have a SharePoint webpart that displays
I am trying to debug a strange issue with users that have LogMeIn installed.

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.