Automated dotnet-format update
This commit is contained in:
1 parent
ad4c2f68aa
commit
2af18c2d38
403 files changed
+1569
-1567
No files matched your search
@@ -65,7 +65,7 @@ namespace HandyControl.Controls
|
||||
var centerX = element.DesiredSize.Width / 2.0;
|
||||
var centerY = element.DesiredSize.Height / 2.0;
|
||||
var angle = perDeg * i++ + offsetAngle;
|
||||
|
||||
|
||||
var transform = new RotateTransform
|
||||
{
|
||||
CenterX = centerX,
|
||||
@@ -73,18 +73,18 @@ namespace HandyControl.Controls
|
||||
Angle = keepVertical ? 0 : angle
|
||||
};
|
||||
element.RenderTransform = transform;
|
||||
|
||||
|
||||
var r = Math.PI * angle / 180.0;
|
||||
var x = radius * Math.Cos(r);
|
||||
var y = radius * Math.Sin(r);
|
||||
|
||||
|
||||
var rectX = x + finalSize.Width / 2 - centerX;
|
||||
var rectY = y + finalSize.Height / 2 - centerY;
|
||||
|
||||
|
||||
element.Arrange(new Rect(rectX, rectY, element.DesiredSize.Width, element.DesiredSize.Height));
|
||||
}
|
||||
|
||||
return finalSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ namespace HandyControl.Controls
|
||||
=> element.SetValue(OrderProperty, value);
|
||||
|
||||
public static int GetOrder(DependencyObject element)
|
||||
=> (int)element.GetValue(OrderProperty);
|
||||
=> (int) element.GetValue(OrderProperty);
|
||||
|
||||
public static readonly DependencyProperty FlexGrowProperty = DependencyProperty.RegisterAttached(
|
||||
"FlexGrow", typeof(double), typeof(FlexPanel),
|
||||
@@ -39,7 +39,7 @@ namespace HandyControl.Controls
|
||||
=> element.SetValue(FlexGrowProperty, value);
|
||||
|
||||
public static double GetFlexGrow(DependencyObject element)
|
||||
=> (double)element.GetValue(FlexGrowProperty);
|
||||
=> (double) element.GetValue(FlexGrowProperty);
|
||||
|
||||
public static readonly DependencyProperty FlexShrinkProperty = DependencyProperty.RegisterAttached(
|
||||
"FlexShrink", typeof(double), typeof(FlexPanel),
|
||||
@@ -50,7 +50,7 @@ namespace HandyControl.Controls
|
||||
=> element.SetValue(FlexShrinkProperty, value);
|
||||
|
||||
public static double GetFlexShrink(DependencyObject element)
|
||||
=> (double)element.GetValue(FlexShrinkProperty);
|
||||
=> (double) element.GetValue(FlexShrinkProperty);
|
||||
|
||||
public static readonly DependencyProperty FlexBasisProperty = DependencyProperty.RegisterAttached(
|
||||
"FlexBasis", typeof(double), typeof(FlexPanel),
|
||||
@@ -60,7 +60,7 @@ namespace HandyControl.Controls
|
||||
=> element.SetValue(FlexBasisProperty, value);
|
||||
|
||||
public static double GetFlexBasis(DependencyObject element)
|
||||
=> (double)element.GetValue(FlexBasisProperty);
|
||||
=> (double) element.GetValue(FlexBasisProperty);
|
||||
|
||||
public static readonly DependencyProperty AlignSelfProperty = DependencyProperty.RegisterAttached(
|
||||
"AlignSelf", typeof(FlexItemAlignment), typeof(FlexPanel),
|
||||
@@ -74,7 +74,7 @@ namespace HandyControl.Controls
|
||||
#region Panel
|
||||
|
||||
public static FlexItemAlignment GetAlignSelf(DependencyObject element)
|
||||
=> (FlexItemAlignment)element.GetValue(AlignSelfProperty);
|
||||
=> (FlexItemAlignment) element.GetValue(AlignSelfProperty);
|
||||
|
||||
public static readonly DependencyProperty FlexDirectionProperty = DependencyProperty.Register(
|
||||
"FlexDirection", typeof(FlexDirection), typeof(FlexPanel),
|
||||
@@ -82,7 +82,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public FlexDirection FlexDirection
|
||||
{
|
||||
get => (FlexDirection)GetValue(FlexDirectionProperty);
|
||||
get => (FlexDirection) GetValue(FlexDirectionProperty);
|
||||
set => SetValue(FlexDirectionProperty, value);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public FlexWrap FlexWrap
|
||||
{
|
||||
get => (FlexWrap)GetValue(FlexWrapProperty);
|
||||
get => (FlexWrap) GetValue(FlexWrapProperty);
|
||||
set => SetValue(FlexWrapProperty, value);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public FlexContentJustify JustifyContent
|
||||
{
|
||||
get => (FlexContentJustify)GetValue(JustifyContentProperty);
|
||||
get => (FlexContentJustify) GetValue(JustifyContentProperty);
|
||||
set => SetValue(JustifyContentProperty, value);
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public FlexItemsAlignment AlignItems
|
||||
{
|
||||
get => (FlexItemsAlignment)GetValue(AlignItemsProperty);
|
||||
get => (FlexItemsAlignment) GetValue(AlignItemsProperty);
|
||||
set => SetValue(AlignItemsProperty, value);
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public FlexContentAlignment AlignContent
|
||||
{
|
||||
get => (FlexContentAlignment)GetValue(AlignContentProperty);
|
||||
get => (FlexContentAlignment) GetValue(AlignContentProperty);
|
||||
set => SetValue(AlignContentProperty, value);
|
||||
}
|
||||
|
||||
@@ -604,7 +604,7 @@ namespace HandyControl.Controls
|
||||
|
||||
var v = lineInfo.OffsetV;
|
||||
var alignSelf = GetAlignSelf(child);
|
||||
var alignment = alignSelf == FlexItemAlignment.Auto ? alignItems : (FlexItemsAlignment)alignSelf;
|
||||
var alignment = alignSelf == FlexItemAlignment.Auto ? alignItems : (FlexItemsAlignment) alignSelf;
|
||||
|
||||
switch (alignment)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public ColLayout Layout
|
||||
{
|
||||
get => (ColLayout)GetValue(LayoutProperty);
|
||||
get => (ColLayout) GetValue(LayoutProperty);
|
||||
set => SetValue(LayoutProperty, value);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public int Offset
|
||||
{
|
||||
get => (int)GetValue(OffsetProperty);
|
||||
get => (int) GetValue(OffsetProperty);
|
||||
set => SetValue(OffsetProperty, value);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private static bool OnSpanValidate(object value)
|
||||
{
|
||||
var v = (int)value;
|
||||
var v = (int) value;
|
||||
return v >= 1 && v <= 24;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using HandyControl.Tools.Extension;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Tools;
|
||||
using HandyControl.Tools.Extension;
|
||||
|
||||
namespace HandyControl.Controls
|
||||
{
|
||||
@@ -22,7 +22,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public double Gutter
|
||||
{
|
||||
get => (double)GetValue(GutterProperty);
|
||||
get => (double) GetValue(GutterProperty);
|
||||
set => SetValue(GutterProperty, value);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace HandyControl.Controls
|
||||
|
||||
count -= 1;
|
||||
|
||||
var index = (int)Math.Floor(Math.Pow(count / 3.0 + 0.25, 0.5) - 0.5);
|
||||
var index = (int) Math.Floor(Math.Pow(count / 3.0 + 0.25, 0.5) - 0.5);
|
||||
var valeIndex = 3 * index * index + 3 * index;
|
||||
|
||||
return count > valeIndex
|
||||
@@ -163,4 +163,4 @@ namespace HandyControl.Controls
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@ namespace HandyControl.Controls
|
||||
|
||||
[TypeConverter(typeof(NameReferenceConverter))]
|
||||
public static UIElement GetLeftOf(DependencyObject element)
|
||||
=> (UIElement)element.GetValue(LeftOfProperty);
|
||||
=> (UIElement) element.GetValue(LeftOfProperty);
|
||||
|
||||
public static readonly DependencyProperty AboveProperty = DependencyProperty.RegisterAttached(
|
||||
"Above", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
|
||||
@@ -122,7 +122,7 @@ namespace HandyControl.Controls
|
||||
|
||||
[TypeConverter(typeof(NameReferenceConverter))]
|
||||
public static UIElement GetAbove(DependencyObject element)
|
||||
=> (UIElement)element.GetValue(AboveProperty);
|
||||
=> (UIElement) element.GetValue(AboveProperty);
|
||||
|
||||
public static readonly DependencyProperty RightOfProperty = DependencyProperty.RegisterAttached(
|
||||
"RightOf", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
|
||||
@@ -132,7 +132,7 @@ namespace HandyControl.Controls
|
||||
|
||||
[TypeConverter(typeof(NameReferenceConverter))]
|
||||
public static UIElement GetRightOf(DependencyObject element)
|
||||
=> (UIElement)element.GetValue(RightOfProperty);
|
||||
=> (UIElement) element.GetValue(RightOfProperty);
|
||||
|
||||
public static readonly DependencyProperty BelowProperty = DependencyProperty.RegisterAttached(
|
||||
"Below", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
|
||||
@@ -155,7 +155,7 @@ namespace HandyControl.Controls
|
||||
=> element.SetValue(AlignHorizontalCenterWithPanelProperty, ValueBoxes.BooleanBox(value));
|
||||
|
||||
public static bool GetAlignHorizontalCenterWithPanel(DependencyObject element)
|
||||
=> (bool)element.GetValue(AlignHorizontalCenterWithPanelProperty);
|
||||
=> (bool) element.GetValue(AlignHorizontalCenterWithPanelProperty);
|
||||
|
||||
public static readonly DependencyProperty AlignVerticalCenterWithPanelProperty = DependencyProperty.RegisterAttached(
|
||||
"AlignVerticalCenterWithPanel", typeof(bool), typeof(RelativePanel), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.AffectsRender));
|
||||
@@ -164,7 +164,7 @@ namespace HandyControl.Controls
|
||||
=> element.SetValue(AlignVerticalCenterWithPanelProperty, ValueBoxes.BooleanBox(value));
|
||||
|
||||
public static bool GetAlignVerticalCenterWithPanel(DependencyObject element)
|
||||
=> (bool)element.GetValue(AlignVerticalCenterWithPanelProperty);
|
||||
=> (bool) element.GetValue(AlignVerticalCenterWithPanelProperty);
|
||||
|
||||
public static readonly DependencyProperty AlignHorizontalCenterWithProperty = DependencyProperty.RegisterAttached(
|
||||
"AlignHorizontalCenterWith", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
|
||||
@@ -174,7 +174,7 @@ namespace HandyControl.Controls
|
||||
|
||||
[TypeConverter(typeof(NameReferenceConverter))]
|
||||
public static UIElement GetAlignHorizontalCenterWith(DependencyObject element)
|
||||
=> (UIElement)element.GetValue(AlignHorizontalCenterWithProperty);
|
||||
=> (UIElement) element.GetValue(AlignHorizontalCenterWithProperty);
|
||||
|
||||
public static readonly DependencyProperty AlignVerticalCenterWithProperty = DependencyProperty.RegisterAttached(
|
||||
"AlignVerticalCenterWith", typeof(UIElement), typeof(RelativePanel), new FrameworkPropertyMetadata(default(UIElement), FrameworkPropertyMetadataOptions.AffectsRender));
|
||||
@@ -184,7 +184,7 @@ namespace HandyControl.Controls
|
||||
|
||||
[TypeConverter(typeof(NameReferenceConverter))]
|
||||
public static UIElement GetAlignVerticalCenterWith(DependencyObject element)
|
||||
=> (UIElement)element.GetValue(AlignVerticalCenterWithProperty);
|
||||
=> (UIElement) element.GetValue(AlignVerticalCenterWithProperty);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -321,7 +321,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
if (node.Measured || !node.OutgoingNodes.Any())
|
||||
{
|
||||
if (prevNode.LeftOfNode != null && prevNode.LeftOfNode == node ||
|
||||
if (prevNode.LeftOfNode != null && prevNode.LeftOfNode == node ||
|
||||
prevNode.RightOfNode != null && prevNode.RightOfNode == node)
|
||||
{
|
||||
prevSize.Width += node.BoundingSize.Width;
|
||||
@@ -681,4 +681,4 @@ namespace HandyControl.Controls
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,4 +39,4 @@ namespace HandyControl.Controls
|
||||
return arrangeSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace HandyControl.Controls
|
||||
set => SetValue(GroupsProperty, value);
|
||||
}
|
||||
|
||||
private static bool IsGroupsValid(object value) => (int)value >= 1;
|
||||
private static bool IsGroupsValid(object value) => (int) value >= 1;
|
||||
|
||||
public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(
|
||||
"Orientation", typeof(Orientation), typeof(WaterfallPanel), new FrameworkPropertyMetadata(
|
||||
@@ -27,7 +27,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
get => (Orientation) GetValue(OrientationProperty);
|
||||
set => SetValue(OrientationProperty, value);
|
||||
}
|
||||
}
|
||||
|
||||
protected override Size MeasureOverride(Size constraint)
|
||||
{
|
||||
@@ -81,4 +81,4 @@ namespace HandyControl.Controls
|
||||
return panelSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user