Modified Window Style

This commit is contained in:
NaBian committed 2019-06-15 00:06:42 +08:00
1 parent d26b4693c2
commit 82cf0bfcdb
23 files changed
+39 -36

No files matched your search

@@ -246,7 +246,7 @@ namespace HandyControl.Controls
{
if (show)
{
for (int i = 0; i < itemsCount; i++)
for (var i = 0; i < itemsCount; i++)
{
var row = (DataGridRow)generator.ContainerFromIndex(i);
if (row != null)
@@ -257,7 +257,7 @@ namespace HandyControl.Controls
}
else
{
for (int i = 0; i < itemsCount; i++)
for (var i = 0; i < itemsCount; i++)
{
var row = (DataGridRow)generator.ContainerFromIndex(i);
if (row != null)
@@ -333,7 +333,7 @@ namespace HandyControl.Controls
}
var list = new List<bool>();
for (int i = 0; i < 2; i++)
for (var i = 0; i < 2; i++)
{
list.Add(false);
}
@@ -321,7 +321,7 @@ namespace HandyControl.Controls
try
{
for (int i = 0; i < count; i++)
for (var i = 0; i < count; i++)
{
guids[i] = (Guid)ExternDllHelper.PtrToStructure((IntPtr)((long)buffer + size * i), typeof(Guid));
}
@@ -36,11 +36,11 @@ namespace HandyControl.Controls
public static readonly DependencyProperty DotCountProperty = DependencyProperty.Register(
"DotCount", typeof(int), typeof(LoadingBase),
new FrameworkPropertyMetadata(5, FrameworkPropertyMetadataOptions.AffectsRender));
new FrameworkPropertyMetadata(ValueBoxes.Int5Box, FrameworkPropertyMetadataOptions.AffectsRender));
public static readonly DependencyProperty DotIntervalProperty = DependencyProperty.Register(
"DotInterval", typeof(double), typeof(LoadingBase),
new FrameworkPropertyMetadata(10.0, FrameworkPropertyMetadataOptions.AffectsRender));
new FrameworkPropertyMetadata(ValueBoxes.Double10Box, FrameworkPropertyMetadataOptions.AffectsRender));
public static readonly DependencyProperty DotBorderBrushProperty = DependencyProperty.Register(
"DotBorderBrush", typeof(Brush), typeof(LoadingBase),
@@ -122,7 +122,7 @@ namespace HandyControl.Controls
StretchProperty.AddOwner(typeof(AnimationPath), new FrameworkPropertyMetadata(Stretch.Uniform,
OnPropertiesChanged));
StrokeThicknessProperty.AddOwner(typeof(AnimationPath), new FrameworkPropertyMetadata(1.0,
StrokeThicknessProperty.AddOwner(typeof(AnimationPath), new FrameworkPropertyMetadata(ValueBoxes.Double1Box,
OnPropertiesChanged));
}
@@ -82,7 +82,7 @@ namespace HandyControl.Controls
/// 最大页数
/// </summary>
public static readonly DependencyProperty MaxPageCountProperty = DependencyProperty.Register(
"MaxPageCount", typeof(int), typeof(Pagination), new PropertyMetadata(1, (o, args) =>
"MaxPageCount", typeof(int), typeof(Pagination), new PropertyMetadata(ValueBoxes.Int1Box, (o, args) =>
{
if (o is Pagination pagination && args.NewValue is int value)
{
@@ -156,7 +156,7 @@ namespace HandyControl.Controls
/// 当前页
/// </summary>
public static readonly DependencyProperty PageIndexProperty = DependencyProperty.Register(
"PageIndex", typeof(int), typeof(Pagination), new PropertyMetadata(1, (o, args) =>
"PageIndex", typeof(int), typeof(Pagination), new PropertyMetadata(ValueBoxes.Int1Box, (o, args) =>
{
if (o is Pagination pagination && args.NewValue is int value)
{
@@ -312,7 +312,7 @@ namespace HandyControl.Controls
}
var sub = PageIndex;
for (int i = 0; i < MaxPageInterval - 1; i++)
for (var i = 0; i < MaxPageInterval - 1; i++)
{
if (--sub > 1)
{
@@ -324,7 +324,7 @@ namespace HandyControl.Controls
}
}
var add = PageIndex;
for (int i = 0; i < MaxPageInterval - 1; i++)
for (var i = 0; i < MaxPageInterval - 1; i++)
{
if (++add < MaxPageCount)
{
@@ -33,7 +33,7 @@ namespace HandyControl.Controls
base.OnVisualChildrenChanged(visualAdded, visualRemoved);
var count = Items.Count;
for (int i = 0; i < count; i++)
for (var i = 0; i < count; i++)
{
var item = (RadioButton)Items[i];
item.Style = ItemStyleSelector?.SelectStyle(item, this);
@@ -353,7 +353,7 @@ namespace HandyControl.Controls
{
if (_visualChildren == null) return 0;
for (int i = 0; i < _visualChildren.Length; i++)
for (var i = 0; i < _visualChildren.Length; i++)
{
if (_visualChildren[i] == null) return i;
}
@@ -38,7 +38,7 @@ namespace HandyControl.Controls
var count = Items.Count;
if (count <= 0) return;
for (int i = 0; i < count; i++)
for (var i = 0; i < count; i++)
{
if (ItemContainerGenerator.ContainerFromIndex(i) is StepBarItem stepBarItem)
{
@@ -48,7 +48,7 @@ namespace HandyControl.Controls
if (StepIndex < count)
{
for (int i = 0; i < StepIndex; i++)
for (var i = 0; i < StepIndex; i++)
{
if (ItemContainerGenerator.ContainerFromIndex(i) is StepBarItem stepBarItem)
{
@@ -102,7 +102,7 @@ namespace HandyControl.Controls
private void CreateItemsSource(ItemsControl selector, int count)
{
var list = new List<string>();
for (int i = 0; i < count; i++)
for (var i = 0; i < count; i++)
{
list.Add(i.ToString("#00"));
}
@@ -9,7 +9,6 @@ using HandyControl.Tools.Extension;
using Microsoft.Windows.Shell;
#else
using System.Windows.Shell;
#endif
namespace HandyControl.Controls