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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:11:40+00:00 2026-05-23T00:11:40+00:00

Starting with the stock Databound application, I have three strings: LineOne, LineTwo and LineThree.

  • 0

Starting with the stock Databound application, I have three strings: LineOne, LineTwo and LineThree. Now imagine I had IntThree instead of LineThree.

The data is added to Items like so:

this.Items.Add(new ItemViewModel() { LineOne = "runtime one", LineTwo = "Maecenas praesent accumsan bibendum", IntThree = 5 });
this.Items.Add(new ItemViewModel() { LineOne = "runtime two", LineTwo = "Dictumst eleifend facilisi faucibus", IntThree = 8 });

and so on.

In the MainPage I have

<StackPanel Margin="0,0,0,17" Width="432">
       <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
       <TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
       <TextBlock Text="{Binding IntTwo}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
</StackPanel>

The display order of the items in the Listbox that surrounds the StackPanel depends on the order the items were added to ‘Items’. I plan to have an app bar menu that says ‘Sort by LineOne’, ‘Sort by IntThree’, etc. Does anyone know if it’s possible to sort this list and then refresh the UI. How would I go about doing that? I’m aware that ObservableCollections can update the UI on add and remove, but will this work for sort as well. I cannot make an explicit Navigate to the same page.

Thanks for looking.

  • 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-23T00:11:40+00:00Added an answer on May 23, 2026 at 12:11 am

    You can use linq to order your items

    lstItems.ItemsSource = yourList.OrderBy(i=>i.LineOne).ToList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a J2EE web-application running on Sun hardware with OpenSolaris/Glassfish stack. We're starting
I am starting to learn ASP.NET MVC. I have deployed the stock ASP.NET MVC
I'm working through the rails tutorial and have gotten stuck. Starting at Listing 8.16
Starting stopping JBoss server using Ant target instead of exec and pass the run
After starting out with Python on Ubuntu Linux, I've now for a good while
I have a very busy UI, a lot of constant updating without interaction (imagine
I'm into a problem with a GTK+ C application. I have a container that,
We have a Python application that polls directories using threads and inotify watchers. We
I'm starting out with Android development, and I'm kind of stuck. Basically, I have
Starting recently, I now get AccessViolationException s on most startups of our WinForms app

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.