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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:15:09+00:00 2026-05-23T12:15:09+00:00

<ListBox HorizontalAlignment=Right ItemsSource={Binding Groups} SelectedValue={Binding SelectedGroup}/> On startup, before the screen displayed, my viewmodel

  • 0
<ListBox HorizontalAlignment="Right" 
   ItemsSource="{Binding Groups}" 
   SelectedValue="{Binding SelectedGroup}"/>

On startup, before the screen displayed, my viewmodel had SelectedGroup = Groups.First() (and Groups contained several items).

I spent about an hour trying to figure out why my item was not being selected. When I clicked (or pressed spacebar), then the selected item appeared selected, but before that, the item did not appear selected.

After I added <ListBox IsSynchronizedWithCurrentItem ="True">, the app started working.

Question: Can someone explain why this is necessary? In other words, why would Microsoft have even made this an option? Wouldn’t I always want this behavior?

  • 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-23T12:15:10+00:00Added an answer on May 23, 2026 at 12:15 pm

    Consider this example: Example

    While using a ComboBox, it illustrates the idea: You don’t want the first item automatically selected.

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

Sidebar

Related Questions

I have a listbox, which is defined like so: <ListBox ItemsSource={Binding Source={x:Static local:ResourceCollection.resourceList}} Height=143
My ListBox is databound to 2 fields. The first is left aligned which is
I'm currently binding an xml file to a listbox in C# WPF. Within the
I have a ListBox : <ListBox x:Name=HistogramListBox Grid.Column=1 Margin=8,2,8,0 HorizontalAlignment=Stretch VerticalAlignment=Stretch Template={StaticResource HistogramListBoxControlTemplate} ItemContainerStyle={StaticResource
I have this code in a xaml page: <ListBox Height=524 HorizontalAlignment=Left Margin=12,6,0,0 Name=listBox1 VerticalAlignment=Top
I have a ListBox in WPF application as : <ListBox HorizontalAlignment=Left Margin=16,37,0,16 Name=lbEmpList Width=194
What I have now: <Style TargetType={x:Type ListBox} x:Key=PhotoListBoxStyle> <Style.Triggers> <Trigger Property={Binding Path=IsChecked, ElementName=DetailView} Value=False>
I have a ListBox that has a style defined for ListBoxItems. Inside this style,
I have a listbox where the items contain checkboxes: <ListBox Style={StaticResource CheckBoxListStyle} Name=EditListBox> <ListBox.ItemTemplate>
I have a ListBox which displays items of variable height. I want to show

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.