© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
1 reply
Aljo_M

❔ Reverse order of ListView

Hello again. I have been strugling with this and still dindt figure it out. I have the following code, and i would like to reverse the order of items. What is the easiest and most efficient way to do that in xaml. (I would like it to be 3, 2, 1)
<ListView ItemsSource="{Binding DictionaryOfGlassHeightsY}" HorizontalContentAlignment="Stretch">
  <ListView.ItemTemplate>
    <DataTemplate>
      <StackPanel Orientation="Horizontal">
        <Label Content="{Binding IsRatio}"/>
        <TextBox Text="{Binding Value}" Style="{StaticResource TextBoxMedium}"/>
      </StackPanel>
    </DataTemplate>
  </ListView.ItemTemplate>
</ListView>
<ListView ItemsSource="{Binding DictionaryOfGlassHeightsY}" HorizontalContentAlignment="Stretch">
  <ListView.ItemTemplate>
    <DataTemplate>
      <StackPanel Orientation="Horizontal">
        <Label Content="{Binding IsRatio}"/>
        <TextBox Text="{Binding Value}" Style="{StaticResource TextBoxMedium}"/>
      </StackPanel>
    </DataTemplate>
  </ListView.ItemTemplate>
</ListView>
Screenshot_20221228_164511.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ ✅ ListView Annoyances.
C#CC# / help
3y ago
✅ Listview color
C#CC# / help
3y ago
❔ ListView flickering
C#CC# / help
3y ago
❔ reverse of RemoveAt[index]
C#CC# / help
4y ago