C#C
C#3y ago
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>
Screenshot_20221228_164511.png
Was this page helpful?