forked from xiaoyaocz/biliuwp-lite
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ScrollGridView 实现触摸板横向触摸滑动
- Loading branch information
Showing
8 changed files
with
192 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
src/BiliLite.UWP/Controls/HorizontalGridView/HorizontalGridView.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<ResourceDictionary | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:controls="using:BiliLite.Controls"> | ||
<Style TargetType="controls:HorizontalGridView"> | ||
<Setter Property="HorizontalAlignment" Value="Left" /> | ||
<Setter Property="IsTabStop" Value="False" /> | ||
<Setter Property="TabNavigation" Value="Once" /> | ||
<Setter Property="ScrollViewer.HorizontalScrollMode" Value="Enabled" /> | ||
<Setter Property="IsSwipeEnabled" Value="True" /> | ||
<Setter Property="UseSystemFocusVisuals" Value="True" /> | ||
<Setter Property="FocusVisualMargin" Value="-2" /> | ||
<Setter Property="ItemContainerTransitions"> | ||
<Setter.Value> | ||
<TransitionCollection> | ||
<AddDeleteThemeTransition /> | ||
<ContentThemeTransition /> | ||
<ReorderThemeTransition /> | ||
<EntranceThemeTransition IsStaggeringEnabled="False" /> | ||
</TransitionCollection> | ||
</Setter.Value> | ||
</Setter> | ||
<Setter Property="ItemsPanel"> | ||
<Setter.Value> | ||
<ItemsPanelTemplate> | ||
<ItemsWrapGrid Orientation="Horizontal" /> | ||
</ItemsPanelTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="GridView"> | ||
<Grid | ||
x:Name="root" | ||
Background="{TemplateBinding Background}" | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}"> | ||
<ScrollViewer | ||
x:Name="scrollViewer" | ||
AutomationProperties.AccessibilityView="Raw" | ||
BringIntoViewOnFocusChange="{TemplateBinding ScrollViewer.BringIntoViewOnFocusChange}" | ||
HorizontalScrollBarVisibility="Hidden" | ||
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" | ||
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" | ||
IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" | ||
IsHorizontalScrollChainingEnabled="{TemplateBinding ScrollViewer.IsHorizontalScrollChainingEnabled}" | ||
IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" | ||
IsVerticalScrollChainingEnabled="{TemplateBinding ScrollViewer.IsVerticalScrollChainingEnabled}" | ||
TabNavigation="{TemplateBinding TabNavigation}" | ||
VerticalScrollBarVisibility="Auto" | ||
VerticalScrollMode="Disabled" | ||
ZoomMode="Disabled"> | ||
<Grid x:Name="itemsPresenterPanel" Background="Transparent"> | ||
<ItemsPresenter | ||
Footer="{TemplateBinding Footer}" | ||
FooterTemplate="{TemplateBinding FooterTemplate}" | ||
FooterTransitions="{TemplateBinding FooterTransitions}" | ||
Header="{TemplateBinding Header}" | ||
HeaderTemplate="{TemplateBinding HeaderTemplate}" | ||
HeaderTransitions="{TemplateBinding HeaderTransitions}" /> | ||
</Grid> | ||
</ScrollViewer> | ||
<Button | ||
x:Name="moveLeft" | ||
Height="56" | ||
Margin="4" | ||
HorizontalAlignment="Left" | ||
VerticalAlignment="Center" | ||
Background="#66000000" | ||
Visibility="Collapsed"> | ||
<FontIcon | ||
FontFamily="Segoe MDL2 Assets" | ||
FontSize="14" | ||
Foreground="White" | ||
Glyph="" /> | ||
</Button> | ||
<Button | ||
x:Name="moveRight" | ||
Height="56" | ||
Margin="4" | ||
HorizontalAlignment="Right" | ||
VerticalAlignment="Center" | ||
Background="#66000000" | ||
Visibility="Collapsed"> | ||
<FontIcon | ||
FontFamily="Segoe MDL2 Assets" | ||
FontSize="14" | ||
Foreground="White" | ||
Glyph="" /> | ||
</Button> | ||
</Grid> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
</ResourceDictionary> |
77 changes: 0 additions & 77 deletions
77
src/BiliLite.UWP/Controls/ScrollGridView/ScrollGridView.xaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.