Skip to content

Instantly share code, notes, and snippets.

@nmetulev
Created February 21, 2018 04:58
Show Gist options
  • Select an option

  • Save nmetulev/1bf265d27f90ad7813b5bd979f1bc354 to your computer and use it in GitHub Desktop.

Select an option

Save nmetulev/1bf265d27f90ad7813b5bd979f1bc354 to your computer and use it in GitHub Desktop.
<Page
x:Class="App3.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App3"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
xmlns:animations="using:Microsoft.Toolkit.Uwp.UI.Animations"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<GridView Name="WrapPanelContainer"
IsItemClickEnabled="True"
ItemsSource="{x:Bind Items}">
<GridView.ItemContainerStyle>
<Style TargetType="GridViewItem">
<Setter Property="animations:Implicit.Animations">
<Setter.Value>
<animations:AnimationCollection>
<animations:OffsetAnimation />
</animations:AnimationCollection>
</Setter.Value>
</Setter>
</Style>
</GridView.ItemContainerStyle>
<GridView.ItemTemplate>
<DataTemplate>
<Grid Height="100" Width="100" Background="Red"></Grid>
</DataTemplate>
</GridView.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<controls:WrapPanel Background="LightGray"
VerticalSpacing="5"
HorizontalSpacing="5"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</GridView>
</Grid>
</Page>
@skendrot
Copy link

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment