You might want to use an ItemsControl / ListBox , and then set the UniformGrid panel to display 3x3 as the ItemsPanel to create a suitable WPF-compatible solution.
<ListBox ScrollViewer.HorizontalScrollBarVisibility="Disabled"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <UniformGrid Rows="3" Columns="3"/> </ItemsPanelTemplate> </ListBox.ItemsPanel> <Image Source="Images\img1.jpg" Width="100"/> <Image Source="Images\img2.jpg" Width="50"/> <Image Source="Images\img3.jpg" Width="200"/> <Image Source="Images\img4.jpg" Width="75"/> <Image Source="Images\img5.jpg" Width="125"/> <Image Source="Images\img6.jpg" Width="100"/> <Image Source="Images\img7.jpg" Width="50"/> <Image Source="Images\img8.jpg" Width="50"/> <Image Source="Images\img9.jpg" Width="50"/> </ListBox>
You need to set your image collection as an ItemsSource binding if you are looking for a dynamic solution here. But the question is too broad to give an exact answer.
Jobi joy
source share