■ FlipView 엘리먼트의 ItemsPanel 속성에서 VirtualizingStackPanel 엘리먼트를 사용하는 방법을 보여준다.
▶ 예제 코드 (XAML)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
<FlipView Name="flipView" Width="480" Height="270" BorderThickness="1" BorderBrush="Black"> <FlipView.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel Orientation="Vertical" /> </ItemsPanelTemplate> </FlipView.ItemsPanel> <FlipView.ItemTemplate> <DataTemplate> <Grid> <Image Width="480" Height="270" Stretch="UniformToFill" Source="{Binding Image}" /> <Border VerticalAlignment="Bottom" Background="#a5000000" Height="80"> <TextBlock Padding="15 20" Foreground="#ccffffff" FontFamily="Segoe UI" FontSize="24" Text="{Binding Name}" /> </Border> </Grid> </DataTemplate> </FlipView.ItemTemplate> </FlipView> |