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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:35:32+00:00 2026-06-01T17:35:32+00:00

I avoided to ask this question, but the ListBox’s selected index can no be

  • 0

I avoided to ask this question, but the ListBox’s selected index can no be set. I have read the other threads and applied the settings, but it doesn’t work.

            <ListBox  ItemsSource="{Binding}" 
                      HorizontalAlignment="Right" 
                      Name="lstReading" Height="Auto" 
                      SelectedIndex="{Binding BookmarkSelectedIndex}">

In the something.xaml.cs, I am settings

            lstReading.DataContext = IQText;

Where, IQText is an IEnumerable<dictIQ> and includes the BookmarkSelectedIndex as data element. Other data elements from IQText can be used but the listindex can’t be set. Could someone please let me know why?

  • 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-01T17:35:34+00:00Added an answer on June 1, 2026 at 5:35 pm

    Are you have BookmarkSelectedIndex inside of dictIQ class? So, you have one BookmarkSelectedIndex per item, not per collection!

    You can create separate property BookmarkSelectedIndex outside of dictIQ or create class that inherited from ObservalbeCollection<dictIQ> and have additional property BookmarkSelectedIndex:

    public class CollectionWithIndex: ObservalbeCollection<dictIQ>
    {
        public int BookmarkSelectedIndex { get; set; }
    }
    

    I hope you choose best solution suitable for you

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

Sidebar

Related Questions

I know this should be avoided, but unfortunately I have to use integers and
Okay, so I'm not even sure how to ask this question (much less search
Up to this point I've avoided javascript, mostly because I'm a newbie. But I
I have recently read about how cursors should be avoided. Well, I would like
I read somewhere that synchronized(this) should be avoided for various reasons . Yet some
I can't remember the recommendation on this -- should it be avoided? Is it
This has bothered me for a while and I've avoided it but the time
I know eval() and exec() should be avoided, but in this situation it seems
this code creates a csv file. However, I have avoided printing out commas in
Initially I thought I needed this, but I eventually avoided it. However, my curiosity

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.