I have some photos in a GridView:
<GridView x:Name="lista" Padding="5">
<GridView.ItemTemplate>
<DataTemplate>
<StackPanel Background="#FF3E3E3E">
<Image Width="150" Height="220" Source="{Binding}" ></Image>
</StackPanel>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
How can i select multiple images from the GridView (like the FilePicker of Windows 10)?
Simply set the SelectionMode
property.
<GridView x:Name="lista" Padding="5" SelectionMode="Multiple">
<GridView.ItemTemplate>
<DataTemplate>
<Image Width="150" Height="220" Source="{Binding}" />
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
Note that in the sample code provided, there's no need for a StackPanel (keep your visual tree as small as possible).