Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<ListBox ItemsSource="{Binding Reports}" Margin="10,92,10,10" ScrollViewer.HorizontalScrollBarVisibility="Disabled"  ScrollViewer.VerticalScrollBarVisibility="Disabled">
           <ListBox.GroupStyle>
               <GroupStyle>
                   <GroupStyle.HeaderTemplate>
                       <DataTemplate>
                           <TextBlock Text="{Binding Path=Name}" />
                       </DataTemplate>
                   </GroupStyle.HeaderTemplate>
               </GroupStyle>
           </ListBox.GroupStyle>
           <ListBox.ItemsPanel>
               <ItemsPanelTemplate>
                   <WrapPanel Orientation="Vertical" IsItemsHost="True">
                   </WrapPanel>
               </ItemsPanelTemplate>
           </ListBox.ItemsPanel>
       </ListBox>


Hi, WrapPanel works fine if I remove GroupStyle but with GroupStyle Wrapping doesn't work and it's shown as normal List.
Posted

1 solution

Try setting the GroupStyle.Panel, or upgrading to .NET 4.5:
Styling ListView.GroupStyle with a WrapPanel - StackOverflow[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 26-Mar-15 12:23pm    
5ed.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900