diff --git a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml
index 948fd99ee..b734888c7 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml
@@ -318,7 +318,7 @@
-
+
@@ -414,7 +414,7 @@
-
+
diff --git a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml
index aacb36003..25e782ac8 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml
@@ -104,7 +104,7 @@
-
+
diff --git a/src/Net_40/HandyControl_Net_40/Themes/Styles/ListView.xaml b/src/Net_40/HandyControl_Net_40/Themes/Styles/ListView.xaml
index 611c5e90c..1d4bf6c4d 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Styles/ListView.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Styles/ListView.xaml
@@ -2,68 +2,42 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="clr-namespace:HandyControl.Controls">
-
-
+
-
-
diff --git a/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj b/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj
index 5d4de83ee..ad72f48aa 100644
--- a/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj
+++ b/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj
@@ -5,7 +5,7 @@
HandyControlDemo
netcoreapp3.0;netcoreapp3.1;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net481;net5.0-windows;net6.0-windows;net7.0-windows
..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico
- 0108;MSB3026;MSB3061
+ 0108;MSB3026;MSB3061;SYSLIB0014
NETSDK1138
..\..\Shared\HandyControlDemo_Shared\app.manifest
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GridDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GridDemoCtl.xaml
index 1ab2917fc..e3d89bc00 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GridDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GridDemoCtl.xaml
@@ -2,7 +2,6 @@
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:extension="clr-namespace:HandyControl.Tools.Extension;assembly=HandyControl"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
Background="{DynamicResource RegionBrush}">
@@ -146,10 +145,10 @@
-
+
-
+
diff --git a/src/Shared/HandyControl_Shared/Controls/Drawer/Drawer.cs b/src/Shared/HandyControl_Shared/Controls/Drawer/Drawer.cs
index eb973b3e4..bd4b2c73a 100644
--- a/src/Shared/HandyControl_Shared/Controls/Drawer/Drawer.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Drawer/Drawer.cs
@@ -44,7 +44,6 @@ static Drawer()
public Drawer()
{
Loaded += Drawer_Loaded;
- Unloaded += Drawer_Unloaded;
}
private void Drawer_Loaded(object sender, RoutedEventArgs e)
@@ -53,23 +52,8 @@ private void Drawer_Loaded(object sender, RoutedEventArgs e)
{
OnIsOpenChanged(true);
}
- }
- private void Drawer_Unloaded(object sender, RoutedEventArgs e)
- {
Loaded -= Drawer_Loaded;
-
- if (_maskElement != null)
- {
- _maskElement.PreviewMouseLeftButtonDown -= MaskElement_PreviewMouseLeftButtonDown;
- }
-
- if (_storyboard != null)
- {
- _storyboard.Completed -= Storyboard_Completed;
- }
-
- _container = null;
}
private static void DataContextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) =>
diff --git a/src/Shared/HandyControl_Shared/Controls/Image/ImageViewer.cs b/src/Shared/HandyControl_Shared/Controls/Image/ImageViewer.cs
index a75951a6c..9ae80e845 100644
--- a/src/Shared/HandyControl_Shared/Controls/Image/ImageViewer.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Image/ImageViewer.cs
@@ -729,8 +729,14 @@ private void ScaleImg(bool isEnlarge)
var olgImageHeight = ImageHeight;
var tempScale = isEnlarge ? _imgActualScale + ScaleInternal : _imgActualScale - ScaleInternal;
- if (Math.Abs(tempScale) < ScaleInternal || Math.Abs(tempScale - 50) < 0.001)
- return;
+ if (Math.Abs(tempScale) < ScaleInternal)
+ {
+ tempScale = ScaleInternal;
+ }
+ else if (Math.Abs(tempScale) > 50)
+ {
+ tempScale = 50;
+ }
ImageScale = tempScale;
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs
index 85a73296e..efa615f84 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs
@@ -170,7 +170,7 @@ private void UpdateTags()
if (_selectAllItem != null)
{
_isInternalAction = true;
- _selectAllItem.SetCurrentValue(IsSelectedProperty, SelectedItems.Count == Items.Count);
+ _selectAllItem.SetCurrentValue(IsSelectedProperty, Items.Count > 0 && SelectedItems.Count == Items.Count);
_isInternalAction = false;
}
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs
index 4708586fd..11b6fd202 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs
@@ -44,6 +44,11 @@ public ComboBox()
{
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
{
+ if (IsReadOnly)
+ {
+ return;
+ }
+
SetCurrentValue(SelectedValueProperty, null);
SetCurrentValue(SelectedItemProperty, null);
SetCurrentValue(SelectedIndexProperty, -1);
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/TextBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/TextBox.cs
index 293435f60..7c1c9d1b3 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/TextBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/TextBox.cs
@@ -9,6 +9,11 @@ public TextBox()
{
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
{
+ if (IsReadOnly)
+ {
+ return;
+ }
+
SetCurrentValue(TextProperty, string.Empty);
}));
}
diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Col.cs b/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Col.cs
index 7caa97f77..bdb1158b4 100644
--- a/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Col.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Col.cs
@@ -9,7 +9,7 @@ namespace HandyControl.Controls;
public class Col : ContentControl
{
public static readonly DependencyProperty LayoutProperty = DependencyProperty.Register(
- nameof(Layout), typeof(ColLayout), typeof(Col), new PropertyMetadata(default(ColLayout)));
+ nameof(Layout), typeof(ColLayout), typeof(Col), new FrameworkPropertyMetadata(default(ColLayout), FrameworkPropertyMetadataOptions.AffectsParentMeasure));
public ColLayout Layout
{
@@ -18,7 +18,7 @@ public ColLayout Layout
}
public static readonly DependencyProperty OffsetProperty = DependencyProperty.Register(
- nameof(Offset), typeof(int), typeof(Col), new PropertyMetadata(ValueBoxes.Int0Box));
+ nameof(Offset), typeof(int), typeof(Col), new FrameworkPropertyMetadata(ValueBoxes.Int0Box, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
public int Offset
{
@@ -27,12 +27,12 @@ public int Offset
}
public static readonly DependencyProperty SpanProperty = DependencyProperty.Register(
- nameof(Span), typeof(int), typeof(Col), new PropertyMetadata(24), OnSpanValidate);
+ nameof(Span), typeof(int), typeof(Col), new FrameworkPropertyMetadata(ColLayout.ColMaxCellCount, FrameworkPropertyMetadataOptions.AffectsParentMeasure), OnSpanValidate);
private static bool OnSpanValidate(object value)
{
var v = (int) value;
- return v is >= 1 and <= 24;
+ return v is >= 1 and <= ColLayout.ColMaxCellCount;
}
public int Span
@@ -42,7 +42,7 @@ public int Span
}
public static readonly DependencyProperty IsFixedProperty = DependencyProperty.Register(
- nameof(IsFixed), typeof(bool), typeof(Col), new PropertyMetadata(ValueBoxes.FalseBox));
+ nameof(IsFixed), typeof(bool), typeof(Col), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsParentMeasure));
public bool IsFixed
{
@@ -52,44 +52,26 @@ public bool IsFixed
internal int GetLayoutCellCount(ColLayoutStatus status)
{
- var result = 0;
-
- if (Layout != null)
+ if (Layout is not null)
{
- if (!IsFixed)
+ return status switch
{
- switch (status)
- {
- case ColLayoutStatus.Xs:
- result = Layout.Xs;
- break;
- case ColLayoutStatus.Sm:
- result = Layout.Sm;
- break;
- case ColLayoutStatus.Md:
- result = Layout.Md;
- break;
- case ColLayoutStatus.Lg:
- result = Layout.Lg;
- break;
- case ColLayoutStatus.Xl:
- result = Layout.Xl;
- break;
- case ColLayoutStatus.Xxl:
- result = Layout.Xxl;
- break;
- case ColLayoutStatus.Auto:
- break;
- default:
- throw new ArgumentOutOfRangeException(nameof(status), status, null);
- }
- }
+ ColLayoutStatus.Xs => Layout.Xs,
+ ColLayoutStatus.Sm => Layout.Sm,
+ ColLayoutStatus.Md => Layout.Md,
+ ColLayoutStatus.Lg => Layout.Lg,
+ ColLayoutStatus.Xl => Layout.Xl,
+ ColLayoutStatus.Xxl => Layout.Xxl,
+ ColLayoutStatus.Auto => 0,
+ _ => throw new ArgumentOutOfRangeException(nameof(status), status, null),
+ };
}
- else
+
+ if (IsFixed)
{
- result = Span;
+ return 0;
}
- return result;
+ return Span;
}
}
diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Row.cs b/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Row.cs
index cf7a11f75..239b95d1c 100644
--- a/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Row.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Row.cs
@@ -14,12 +14,15 @@ public class Row : Panel
private double _maxChildDesiredHeight;
- private double _totalAutoWidth;
+ private double _fixedWidth;
public static readonly DependencyProperty GutterProperty = DependencyProperty.Register(
- nameof(Gutter), typeof(double), typeof(Row), new PropertyMetadata(ValueBoxes.Double0Box, null, OnGutterCoerce), ValidateHelper.IsInRangeOfPosDoubleIncludeZero);
+ nameof(Gutter), typeof(double), typeof(Row), new FrameworkPropertyMetadata(
+ ValueBoxes.Double0Box, FrameworkPropertyMetadataOptions.AffectsMeasure, null, OnGutterCoerce),
+ ValidateHelper.IsInRangeOfPosDoubleIncludeZero);
- private static object OnGutterCoerce(DependencyObject d, object basevalue) => ValidateHelper.IsInRangeOfPosDoubleIncludeZero(basevalue) ? basevalue : .0;
+ private static object OnGutterCoerce(DependencyObject d, object basevalue) =>
+ ValidateHelper.IsInRangeOfPosDoubleIncludeZero(basevalue) ? basevalue : .0;
public double Gutter
{
@@ -29,51 +32,59 @@ public double Gutter
protected override Size MeasureOverride(Size constraint)
{
+ var gutter = Gutter;
var totalCellCount = 0;
var totalRowCount = 1;
- var gutterHalf = Gutter / 2;
- _totalAutoWidth = 0;
+ _fixedWidth = 0;
+ _maxChildDesiredHeight = 0;
+ var cols = InternalChildren.OfType().ToList();
- foreach (var child in InternalChildren.OfType())
+ foreach (var child in cols)
{
- child.Margin = new Thickness(gutterHalf);
- child.Measure(constraint);
- var childDesiredSize = child.DesiredSize;
-
- if (_maxChildDesiredHeight < childDesiredSize.Height)
- {
- _maxChildDesiredHeight = childDesiredSize.Height;
- }
-
var cellCount = child.GetLayoutCellCount(_layoutStatus);
- totalCellCount += cellCount;
-
- if (totalCellCount > ColLayout.ColMaxCellCount)
+ if (cellCount == 0 || child.IsFixed)
{
- totalCellCount = cellCount;
- totalRowCount++;
+ child.Measure(constraint);
+ _maxChildDesiredHeight = Math.Max(_maxChildDesiredHeight, child.DesiredSize.Height);
+ _fixedWidth += child.DesiredSize.Width + gutter;
}
+ }
- if (cellCount == 0 || child.IsFixed)
+ var itemWidth = (constraint.Width - _fixedWidth + gutter) / ColLayout.ColMaxCellCount;
+ itemWidth = Math.Max(0, itemWidth);
+
+ foreach (var child in cols)
+ {
+ var cellCount = child.GetLayoutCellCount(_layoutStatus);
+ if (cellCount > 0 && !child.IsFixed)
{
- _totalAutoWidth += childDesiredSize.Width;
+ totalCellCount += cellCount;
+ child.Measure(new Size(cellCount * itemWidth - gutter, constraint.Height));
+ _maxChildDesiredHeight = Math.Max(_maxChildDesiredHeight, child.DesiredSize.Height);
+
+ if (totalCellCount > ColLayout.ColMaxCellCount)
+ {
+ totalCellCount = cellCount;
+ totalRowCount++;
+ }
}
}
- return new Size(0, _maxChildDesiredHeight * totalRowCount - Gutter);
+ return new Size(0, _maxChildDesiredHeight * totalRowCount);
}
protected override Size ArrangeOverride(Size finalSize)
{
+ var gutter = Gutter;
var totalCellCount = 0;
- var gutterHalf = Gutter / 2;
- var itemWidth = (finalSize.Width - _totalAutoWidth + Gutter) / ColLayout.ColMaxCellCount;
+ var cols = InternalChildren.OfType().ToList();
+ var itemWidth = (finalSize.Width - _fixedWidth + gutter) / ColLayout.ColMaxCellCount;
itemWidth = Math.Max(0, itemWidth);
- var childBounds = new Rect(-gutterHalf, -gutterHalf, 0, _maxChildDesiredHeight);
+ var childBounds = new Rect(0, 0, 0, _maxChildDesiredHeight);
_layoutStatus = ColLayout.GetLayoutStatus(finalSize.Width);
- foreach (var child in InternalChildren.OfType())
+ foreach (var child in cols)
{
if (!child.IsVisible)
{
@@ -83,19 +94,19 @@ protected override Size ArrangeOverride(Size finalSize)
var cellCount = child.GetLayoutCellCount(_layoutStatus);
totalCellCount += cellCount;
- var childWidth = cellCount > 0 ? cellCount * itemWidth : child.DesiredSize.Width;
-
+ var childWidth = (cellCount > 0 && !child.IsFixed) ? cellCount * itemWidth - gutter : child.DesiredSize.Width;
childBounds.Width = childWidth;
childBounds.X += child.Offset * itemWidth;
+
if (totalCellCount > ColLayout.ColMaxCellCount)
{
- childBounds.X = -gutterHalf;
+ childBounds.X = 0;
childBounds.Y += _maxChildDesiredHeight;
totalCellCount = cellCount;
}
child.Arrange(childBounds);
- childBounds.X += childWidth;
+ childBounds.X += childWidth + gutter;
}
return finalSize;
diff --git a/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs b/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs
index d202527c3..1b4954144 100644
--- a/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs
+++ b/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs
@@ -257,7 +257,11 @@ protected override void OnMouseRightButtonDown(MouseButtonEventArgs e)
{
base.OnMouseRightButtonDown(e);
- if (VisualTreeHelper.HitTest(this, e.GetPosition(this)) == null) return;
+ if (!IsMouseOverHeader(e))
+ {
+ return;
+ }
+
IsSelected = true;
Focus();
}
@@ -300,7 +304,11 @@ protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
{
base.OnMouseLeftButtonDown(e);
- if (VisualTreeHelper.HitTest(this, e.GetPosition(this)) == null) return;
+ if (!IsMouseOverHeader(e))
+ {
+ return;
+ }
+
var parent = TabControlParent;
if (parent == null) return;
@@ -391,7 +399,8 @@ protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
protected override void OnMouseDown(MouseButtonEventArgs e)
{
if (e is { ChangedButton: MouseButton.Middle, ButtonState: MouseButtonState.Pressed } &&
- TabControlParent.CanBeClosedByMiddleButton)
+ TabControlParent.CanBeClosedByMiddleButton &&
+ IsMouseOverHeader(e))
{
if (ShowCloseButton || ShowContextMenu)
{
@@ -474,6 +483,11 @@ private int CalLocationIndex(double left)
return result > maxIndex ? maxIndex : result;
}
+ private bool IsMouseOverHeader(MouseButtonEventArgs e)
+ {
+ return VisualTreeHelper.HitTest(this, e.GetPosition(this)) is not null;
+ }
+
public static readonly RoutedEvent ClosingEvent = EventManager.RegisterRoutedEvent("Closing", RoutingStrategy.Bubble, typeof(EventHandler), typeof(TabItem));
public event EventHandler Closing
diff --git a/src/Shared/HandyControl_Shared/Controls/Tag/TagContainer.cs b/src/Shared/HandyControl_Shared/Controls/Tag/TagContainer.cs
index 39354ce3a..0426a7975 100644
--- a/src/Shared/HandyControl_Shared/Controls/Tag/TagContainer.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Tag/TagContainer.cs
@@ -1,17 +1,28 @@
using System.Collections;
using System.Windows;
using System.Windows.Controls;
+using HandyControl.Data;
using HandyControl.Tools.Extension;
namespace HandyControl.Controls;
public class TagContainer : ItemsControl
{
+ public static readonly DependencyProperty ShowCloseButtonProperty = DependencyProperty.RegisterAttached(
+ "ShowCloseButton", typeof(bool), typeof(TagContainer), new FrameworkPropertyMetadata(ValueBoxes.TrueBox,
+ FrameworkPropertyMetadataOptions.Inherits));
+
public TagContainer()
{
AddHandler(Controls.Tag.ClosedEvent, new RoutedEventHandler(Tag_OnClosed));
}
+ public static void SetShowCloseButton(DependencyObject element, bool value)
+ => element.SetValue(ShowCloseButtonProperty, ValueBoxes.BooleanBox(value));
+
+ public static bool GetShowCloseButton(DependencyObject element)
+ => (bool) element.GetValue(ShowCloseButtonProperty);
+
private void Tag_OnClosed(object sender, RoutedEventArgs e)
{
if (e.OriginalSource is Tag tag)
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/AutoCompleteTextBoxBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/AutoCompleteTextBoxBaseStyle.xaml
index af9f780e2..ba02cd2b5 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/AutoCompleteTextBoxBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/AutoCompleteTextBoxBaseStyle.xaml
@@ -2,8 +2,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="clr-namespace:HandyControl.Controls">
-
-
-
\ No newline at end of file
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ItemsPanelTemplate.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ItemsPanelTemplate.xaml
index bada6f89a..845a5628e 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ItemsPanelTemplate.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ItemsPanelTemplate.xaml
@@ -17,6 +17,14 @@
+
+
+
+
+
+
+
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ListBoxBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ListBoxBaseStyle.xaml
index 4b9f593d5..819023dc8 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ListBoxBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ListBoxBaseStyle.xaml
@@ -79,7 +79,7 @@
-
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/NumericUpDownBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/NumericUpDownBaseStyle.xaml
index ebde4902b..233bde99d 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/NumericUpDownBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/NumericUpDownBaseStyle.xaml
@@ -26,8 +26,8 @@
-
-
+
+
@@ -67,8 +67,8 @@
-
-
+
+
@@ -110,8 +110,8 @@
-
-
+
+
@@ -165,8 +165,8 @@
-
-
+
+
@@ -214,8 +214,8 @@
-
-
+
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ScrollViewerBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ScrollViewerBaseStyle.xaml
index 8965a84e0..65f65b86c 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ScrollViewerBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ScrollViewerBaseStyle.xaml
@@ -294,7 +294,7 @@
-
+
-
-
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/ScrollViewer.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/ScrollViewer.xaml
index 1d3e56cc5..4a03faa6f 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/ScrollViewer.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/ScrollViewer.xaml
@@ -47,7 +47,7 @@
diff --git a/src/Shared/HandyControl_Shared/Tools/Extension/ColLayout.cs b/src/Shared/HandyControl_Shared/Tools/Extension/ColLayout.cs
index 37f67cea3..00433ba59 100644
--- a/src/Shared/HandyControl_Shared/Tools/Extension/ColLayout.cs
+++ b/src/Shared/HandyControl_Shared/Tools/Extension/ColLayout.cs
@@ -11,19 +11,19 @@ namespace HandyControl.Tools.Extension;
[TypeConverter(typeof(ColLayoutConverter))]
public class ColLayout : MarkupExtension
{
- public static readonly int ColMaxCellCount = 24;
+ public const int ColMaxCellCount = 24;
- public static readonly int HalfColMaxCellCount = 12;
+ public const int HalfColMaxCellCount = 12;
- public static readonly int XsMaxWidth = 768;
+ public const int XsMaxWidth = 768;
- public static readonly int SmMaxWidth = 992;
+ public const int SmMaxWidth = 992;
- public static readonly int MdMaxWidth = 1200;
+ public const int MdMaxWidth = 1200;
- public static readonly int LgMaxWidth = 1920;
+ public const int LgMaxWidth = 1920;
- public static readonly int XlMaxWidth = 2560;
+ public const int XlMaxWidth = 2560;
public int Xs { get; set; } = 24;