Files
HandyControl/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CoverViewDemoCtl.xaml
T

28 lines
1.6 KiB
XML

<UserControl x:Class="HandyControlDemo.UserControl.CoverViewDemoCtl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
DataContext="{Binding CoverView,Source={StaticResource Locator}}"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<hc:ScrollViewer IsInertiaEnabled="True">
<hc:CoverView Margin="27" MaxWidth="880" ItemWidth="160" ItemHeight="160" ItemsSource="{Binding DataList}">
<hc:CoverView.ItemHeaderTemplate>
<DataTemplate>
<Image Source="{Binding ImgPath}"/>
</DataTemplate>
</hc:CoverView.ItemHeaderTemplate>
<hc:CoverView.ItemTemplate>
<DataTemplate>
<Border Margin="10" Height="300" Background="{Binding BackgroundToken,Converter={StaticResource String2BrushConverter}}">
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</DataTemplate>
</hc:CoverView.ItemTemplate>
</hc:CoverView>
</hc:ScrollViewer>
</hc:TransitioningContentControl>
</UserControl>