diff --git a/HandyControl/Controls/CoverView/CoverView.cs b/HandyControl/Controls/CoverView/CoverView.cs
new file mode 100644
index 00000000..72d529b4
--- /dev/null
+++ b/HandyControl/Controls/CoverView/CoverView.cs
@@ -0,0 +1,9 @@
+using System.Windows.Controls;
+
+namespace HandyControl.Controls
+{
+ public class CoverView : ItemsControl
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/HandyControl/Controls/CoverView/CoverViewItem.cs b/HandyControl/Controls/CoverView/CoverViewItem.cs
new file mode 100644
index 00000000..ee9cc718
--- /dev/null
+++ b/HandyControl/Controls/CoverView/CoverViewItem.cs
@@ -0,0 +1,9 @@
+using System.Windows.Controls;
+
+namespace HandyControl.Controls
+{
+ public class CoverViewItem : HeaderedContentControl
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/HandyControl/Controls/Other/ScrollViewer.cs b/HandyControl/Controls/Other/ScrollViewer.cs
index a2fdaccd..823e66fc 100644
--- a/HandyControl/Controls/Other/ScrollViewer.cs
+++ b/HandyControl/Controls/Other/ScrollViewer.cs
@@ -49,14 +49,25 @@ namespace HandyControl.Controls
protected override void OnMouseWheel(MouseWheelEventArgs e)
{
+ if (!CanMouseWheel) return;
+
if (!IsEnableInertia)
{
- base.OnMouseWheel(e);
+ if (Orientation == Orientation.Vertical)
+ {
+ base.OnMouseWheel(e);
+ }
+ else
+ {
+ _totalHorizontalOffset = HorizontalOffset;
+ CurrentHorizontalOffset = HorizontalOffset;
+ _totalHorizontalOffset = Math.Min(Math.Max(0, _totalHorizontalOffset - e.Delta), ScrollableWidth);
+ CurrentHorizontalOffset = _totalHorizontalOffset;
+ }
return;
}
e.Handled = true;
- if (!CanMouseWheel) return;
if (Orientation == Orientation.Vertical)
{
if (!_isRunning)
diff --git a/HandyControl/HandyControl.csproj b/HandyControl/HandyControl.csproj
index 193d91ea..ee5de855 100644
--- a/HandyControl/HandyControl.csproj
+++ b/HandyControl/HandyControl.csproj
@@ -117,6 +117,7 @@
+
@@ -131,6 +132,7 @@
+
@@ -375,6 +377,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -407,6 +413,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/HandyControl/Themes/Styles/Base/CoverViewBaseStyle.xaml b/HandyControl/Themes/Styles/Base/CoverViewBaseStyle.xaml
new file mode 100644
index 00000000..3e872520
--- /dev/null
+++ b/HandyControl/Themes/Styles/Base/CoverViewBaseStyle.xaml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/CoverView.xaml b/HandyControl/Themes/Styles/CoverView.xaml
new file mode 100644
index 00000000..825650eb
--- /dev/null
+++ b/HandyControl/Themes/Styles/CoverView.xaml
@@ -0,0 +1,4 @@
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Style.xaml b/HandyControl/Themes/Styles/Style.xaml
index 19959398..a460151f 100644
--- a/HandyControl/Themes/Styles/Style.xaml
+++ b/HandyControl/Themes/Styles/Style.xaml
@@ -50,6 +50,7 @@
+
\ No newline at end of file
diff --git a/HandyControlDemo/Data/MessageToken.cs b/HandyControlDemo/Data/MessageToken.cs
index 51a59bfe..927788fb 100644
--- a/HandyControlDemo/Data/MessageToken.cs
+++ b/HandyControlDemo/Data/MessageToken.cs
@@ -70,6 +70,8 @@
public static readonly string WaterfallPanelDemoCtl = nameof(WaterfallPanelDemoCtl);
+ public static readonly string CoverViewDemoCtl = nameof(CoverViewDemoCtl);
+
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
diff --git a/HandyControlDemo/Data/MessageToken.tt b/HandyControlDemo/Data/MessageToken.tt
index 5ea16e51..ffe9e0de 100644
--- a/HandyControlDemo/Data/MessageToken.tt
+++ b/HandyControlDemo/Data/MessageToken.tt
@@ -37,7 +37,8 @@ var controlList = new List
"BlurWindow",
"RateDemoCtl",
"ShieldDemoCtl",
- "WaterfallPanelDemoCtl"
+ "WaterfallPanelDemoCtl",
+ "CoverViewDemoCtl"
};
var styleList = new List
{
diff --git a/HandyControlDemo/HandyControlDemo.csproj b/HandyControlDemo/HandyControlDemo.csproj
index 16ec2be7..21f1785f 100644
--- a/HandyControlDemo/HandyControlDemo.csproj
+++ b/HandyControlDemo/HandyControlDemo.csproj
@@ -139,6 +139,9 @@
CompareSliderDemoCtl.xaml
+
+ CoverViewDemoCtl.xaml
+
DatePickerDemoCtl.xaml
@@ -418,6 +421,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
MSBuild:Compile
Designer
@@ -678,6 +685,7 @@
TextTemplatingFileGenerator
MessageToken.cs
+
diff --git a/HandyControlDemo/Properties/Langs/Lang.Designer.cs b/HandyControlDemo/Properties/Langs/Lang.Designer.cs
index 643b06b1..6e2798e8 100644
--- a/HandyControlDemo/Properties/Langs/Lang.Designer.cs
+++ b/HandyControlDemo/Properties/Langs/Lang.Designer.cs
@@ -47,7 +47,7 @@ namespace HandyControlDemo.Properties.Langs {
}
///
- /// 使用此强类型资源类,为所有资源查找
+ /// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性。
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
@@ -303,6 +303,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
+ ///
+ /// 查找类似 封面视图 的本地化字符串。
+ ///
+ public static string CoverView {
+ get {
+ return ResourceManager.GetString("CoverView", resourceCulture);
+ }
+ }
+
///
/// 查找类似 危险 的本地化字符串。
///
diff --git a/HandyControlDemo/Properties/Langs/Lang.en.resx b/HandyControlDemo/Properties/Langs/Lang.en.resx
index faf3af75..a99298ea 100644
--- a/HandyControlDemo/Properties/Langs/Lang.en.resx
+++ b/HandyControlDemo/Properties/Langs/Lang.en.resx
@@ -456,4 +456,7 @@
Groups
+
+ CoverView
+
\ No newline at end of file
diff --git a/HandyControlDemo/Properties/Langs/Lang.resx b/HandyControlDemo/Properties/Langs/Lang.resx
index 0bfff05e..ef6c99fb 100644
--- a/HandyControlDemo/Properties/Langs/Lang.resx
+++ b/HandyControlDemo/Properties/Langs/Lang.resx
@@ -436,4 +436,7 @@
组数
+
+ 封面视图
+
\ No newline at end of file
diff --git a/HandyControlDemo/Resources/Img/LeftMainContent/DetailDataView_16x.png b/HandyControlDemo/Resources/Img/LeftMainContent/DetailDataView_16x.png
new file mode 100644
index 00000000..64f2bcd0
Binary files /dev/null and b/HandyControlDemo/Resources/Img/LeftMainContent/DetailDataView_16x.png differ
diff --git a/HandyControlDemo/UserControl/Controls/CoverViewDemoCtl.xaml b/HandyControlDemo/UserControl/Controls/CoverViewDemoCtl.xaml
new file mode 100644
index 00000000..d2302a54
--- /dev/null
+++ b/HandyControlDemo/UserControl/Controls/CoverViewDemoCtl.xaml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Controls/CoverViewDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Controls/CoverViewDemoCtl.xaml.cs
new file mode 100644
index 00000000..32f1adf9
--- /dev/null
+++ b/HandyControlDemo/UserControl/Controls/CoverViewDemoCtl.xaml.cs
@@ -0,0 +1,10 @@
+namespace HandyControlDemo.UserControl
+{
+ public partial class CoverViewDemoCtl
+ {
+ public CoverViewDemoCtl()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/HandyControlDemo/UserControl/Controls/WaterfallPanelDemoCtl.xaml b/HandyControlDemo/UserControl/Controls/WaterfallPanelDemoCtl.xaml
index a0bc7675..9a631afa 100644
--- a/HandyControlDemo/UserControl/Controls/WaterfallPanelDemoCtl.xaml
+++ b/HandyControlDemo/UserControl/Controls/WaterfallPanelDemoCtl.xaml
@@ -13,7 +13,7 @@
-
+
@@ -32,18 +32,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
index e06f55e4..8137fa7c 100644
--- a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
+++ b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
@@ -235,6 +235,11 @@
+
+
+
+
+