I need to display all the files located in a specific path. I have created a user control which contains textblocks for the details of the file (name, size, extension, etc), this control will be the child of the uniform grid.
The problem is, if my uniformgrid is 5x5, and I have over 25 files, 26th element does not be shown.
I'd like to know, is there a way to scroll the content of uniform grid?
I know I can use a listbox and binding (I'm still reading about it), but I need to add the controls programmatically, 'cause the control has an event, and I'm subscribing to it when a new instance of the usercontrol is created and then added to the child array.
I've seen this post, and I already placed the uniforgrid inside a ItemsControl, but It does not work at all, this is my xaml:
<ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" >
<ItemsControl x:Name="gridArchivos">
<ItemsControl.ItemsPanel >
<ItemsPanelTemplate >
<UniformGrid Columns="5" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</ScrollViewer>
According to the post, only cols or rows need to be specified, never both. So, only 5 cols. I don't want hrizontal scrolling, only vertical.
Thanks for your time.