Skip to content

Commit

Permalink
chore: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Jul 2, 2023
1 parent 060ba72 commit e37549b
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ public static bool GetCanContentRenderOutsideBounds( global::Windows.UI.Xaml.Dep
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public static void SetCanContentRenderOutsideBounds( global::Windows.UI.Xaml.DependencyObject element, bool canContentRenderOutsideBounds)
{
element.SetValue(CanContentRenderOutsideBoundsProperty, Boxes.Box(canContentRenderOutsideBounds));
element.SetValue(CanContentRenderOutsideBoundsProperty, canContentRenderOutsideBounds);
}
#endif
// Forced skipping of method Windows.UI.Xaml.Controls.ScrollViewer.TopLeftHeaderProperty.get
Expand Down Expand Up @@ -597,7 +597,7 @@ public static bool GetIsHorizontalRailEnabled( global::Windows.UI.Xaml.Dependenc
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public static void SetIsHorizontalRailEnabled( global::Windows.UI.Xaml.DependencyObject element, bool isHorizontalRailEnabled)
{
element.SetValue(IsHorizontalRailEnabledProperty, Boxes.Box(isHorizontalRailEnabled));
element.SetValue(IsHorizontalRailEnabledProperty, isHorizontalRailEnabled);
}
#endif
// Forced skipping of method Windows.UI.Xaml.Controls.ScrollViewer.IsVerticalRailEnabledProperty.get
Expand All @@ -612,7 +612,7 @@ public static bool GetIsVerticalRailEnabled( global::Windows.UI.Xaml.DependencyO
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public static void SetIsVerticalRailEnabled( global::Windows.UI.Xaml.DependencyObject element, bool isVerticalRailEnabled)
{
element.SetValue(IsVerticalRailEnabledProperty, Boxes.Box(isVerticalRailEnabled));
element.SetValue(IsVerticalRailEnabledProperty, isVerticalRailEnabled);
}
#endif
// Forced skipping of method Windows.UI.Xaml.Controls.ScrollViewer.IsHorizontalScrollChainingEnabledProperty.get
Expand All @@ -627,7 +627,7 @@ public static bool GetIsHorizontalScrollChainingEnabled( global::Windows.UI.Xaml
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public static void SetIsHorizontalScrollChainingEnabled( global::Windows.UI.Xaml.DependencyObject element, bool isHorizontalScrollChainingEnabled)
{
element.SetValue(IsHorizontalScrollChainingEnabledProperty, Boxes.Box(isHorizontalScrollChainingEnabled));
element.SetValue(IsHorizontalScrollChainingEnabledProperty, isHorizontalScrollChainingEnabled);
}
#endif
// Forced skipping of method Windows.UI.Xaml.Controls.ScrollViewer.IsVerticalScrollChainingEnabledProperty.get
Expand All @@ -642,7 +642,7 @@ public static bool GetIsVerticalScrollChainingEnabled( global::Windows.UI.Xaml.D
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public static void SetIsVerticalScrollChainingEnabled( global::Windows.UI.Xaml.DependencyObject element, bool isVerticalScrollChainingEnabled)
{
element.SetValue(IsVerticalScrollChainingEnabledProperty, Boxes.Box(isVerticalScrollChainingEnabled));
element.SetValue(IsVerticalScrollChainingEnabledProperty, isVerticalScrollChainingEnabled);
}
#endif
// Forced skipping of method Windows.UI.Xaml.Controls.ScrollViewer.IsZoomChainingEnabledProperty.get
Expand All @@ -657,7 +657,7 @@ public static bool GetIsZoomChainingEnabled( global::Windows.UI.Xaml.DependencyO
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public static void SetIsZoomChainingEnabled( global::Windows.UI.Xaml.DependencyObject element, bool isZoomChainingEnabled)
{
element.SetValue(IsZoomChainingEnabledProperty, Boxes.Box(isZoomChainingEnabled));
element.SetValue(IsZoomChainingEnabledProperty, isZoomChainingEnabled);
}
#endif
// Forced skipping of method Windows.UI.Xaml.Controls.ScrollViewer.IsScrollInertiaEnabledProperty.get
Expand All @@ -672,7 +672,7 @@ public static bool GetIsScrollInertiaEnabled( global::Windows.UI.Xaml.Dependency
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public static void SetIsScrollInertiaEnabled( global::Windows.UI.Xaml.DependencyObject element, bool isScrollInertiaEnabled)
{
element.SetValue(IsScrollInertiaEnabledProperty, Boxes.Box(isScrollInertiaEnabled));
element.SetValue(IsScrollInertiaEnabledProperty, isScrollInertiaEnabled);
}
#endif
// Forced skipping of method Windows.UI.Xaml.Controls.ScrollViewer.IsZoomInertiaEnabledProperty.get
Expand All @@ -687,7 +687,7 @@ public static bool GetIsZoomInertiaEnabled( global::Windows.UI.Xaml.DependencyOb
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public static void SetIsZoomInertiaEnabled( global::Windows.UI.Xaml.DependencyObject element, bool isZoomInertiaEnabled)
{
element.SetValue(IsZoomInertiaEnabledProperty, Boxes.Box(isZoomInertiaEnabled));
element.SetValue(IsZoomInertiaEnabledProperty, isZoomInertiaEnabled);
}
#endif
// Forced skipping of method Windows.UI.Xaml.Controls.ScrollViewer.HorizontalScrollModeProperty.get
Expand All @@ -711,7 +711,7 @@ public static bool GetIsDeferredScrollingEnabled( global::Windows.UI.Xaml.Depend
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public static void SetIsDeferredScrollingEnabled( global::Windows.UI.Xaml.DependencyObject element, bool isDeferredScrollingEnabled)
{
element.SetValue(IsDeferredScrollingEnabledProperty, Boxes.Box(isDeferredScrollingEnabled));
element.SetValue(IsDeferredScrollingEnabledProperty, isDeferredScrollingEnabled);
}
#endif
// Forced skipping of method Windows.UI.Xaml.Controls.ScrollViewer.BringIntoViewOnFocusChangeProperty.get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public double CompactModeThresholdWidth
{
var coercedValue = value;
CoerceToGreaterThanZero(ref coercedValue);
SetValue(CompactModeThresholdWidthProperty, Boxes.Box(coercedValue));
SetValue(CompactModeThresholdWidthProperty, coercedValue);
}
}

Expand All @@ -73,7 +73,7 @@ public double CompactPaneLength
{
var coercedValue = value;
CoerceToGreaterThanZero(ref coercedValue);
SetValue(CompactPaneLengthProperty, Boxes.Box(coercedValue));
SetValue(CompactPaneLengthProperty, coercedValue);
}
}

Expand Down Expand Up @@ -395,7 +395,7 @@ public double OpenPaneLength
{
var coercedValue = value;
CoerceToGreaterThanZero(ref coercedValue);
SetValue(OpenPaneLengthProperty, Boxes.Box(coercedValue));
SetValue(OpenPaneLengthProperty, coercedValue);
}
}

Expand Down Expand Up @@ -602,7 +602,7 @@ private static void OnCompactModeThresholdWidthPropertyChanged(
owner.CoerceToGreaterThanZero(ref coercedValue);
if (Math.Abs(coercedValue - value) > 0.1)
{
sender.SetValue(args.Property, Boxes.Box(coercedValue));
sender.SetValue(args.Property, coercedValue);
return;
}

Expand All @@ -620,7 +620,7 @@ private static void OnCompactPaneLengthPropertyChanged(
owner.CoerceToGreaterThanZero(ref coercedValue);
if (Math.Abs(coercedValue - value) > 0.1)
{
sender.SetValue(args.Property, Boxes.Box(coercedValue));
sender.SetValue(args.Property, coercedValue);
return;
}

Expand All @@ -638,7 +638,7 @@ private static void OnExpandedModeThresholdWidthPropertyChanged(
owner.CoerceToGreaterThanZero(ref coercedValue);
if (Math.Abs(coercedValue - value) > 0.1)
{
sender.SetValue(args.Property, Boxes.Box(coercedValue));
sender.SetValue(args.Property, coercedValue);
return;
}

Expand All @@ -656,7 +656,7 @@ private static void OnOpenPaneLengthPropertyChanged(
owner.CoerceToGreaterThanZero(ref coercedValue);
if (Math.Abs(coercedValue - value) > 0.1)
{
sender.SetValue(args.Property, Boxes.Box(coercedValue));
sender.SetValue(args.Property, coercedValue);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ private void UpdateCompactPaneLength()
var splitView = GetSplitView();
if (splitView != null)
{
SetValue(CompactPaneLengthProperty, Boxes.Box(splitView.CompactPaneLength)); //PropertyValue.CreateDouble(splitView.CompactPaneLength));
SetValue(CompactPaneLengthProperty, splitView.CompactPaneLength); //PropertyValue.CreateDouble(splitView.CompactPaneLength));

// Only update when on left
var presenter = GetPresenter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private static void OnMaxColumnsPropertyChanged(
owner.ValidateGreaterThanZero(coercedValue);
if (value != coercedValue)
{
sender.SetValue(args.Property, Boxes.Box(coercedValue));
sender.SetValue(args.Property, coercedValue);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ private void OnPropertyChanged(DependencyPropertyChangedEventArgs args)
var coercedValue = CoerceValueBetweenMinAndMax(value);
if (value != coercedValue)
{
SetValue(property, Boxes.Box(coercedValue));
SetValue(property, coercedValue);
// early return, we'll come back to handle the change to the corced value.
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ private void OnPropertyChanged(DependencyPropertyChangedEventArgs args)
var clampedValue = Math.Max(0.0, value);
if (clampedValue != value)
{
SetValue(property, Boxes.Box(clampedValue));
SetValue(property, clampedValue);
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ private void UpdateTextBlockForegroundOpacity(TextBlock pTextBlock)
opacity = 0.0f;
}

pTextBlock.SetValue(UIElement.OpacityProperty, Boxes.Box(opacity));
pTextBlock.SetValue(UIElement.OpacityProperty, opacity);

}

Expand All @@ -905,7 +905,7 @@ internal void UpdateTextBlockFontProperties(TextBlock pTextBlock)
{
object value;

pTextBlock.SetValue(TextBlock.FontSizeProperty, Boxes.Box((double)properties.fontSize));
pTextBlock.SetValue(TextBlock.FontSizeProperty, (double)properties.fontSize);

value = properties.fontStyle;
pTextBlock.SetValue(TextBlock.FontStyleProperty, (FontStyle)value);
Expand Down
8 changes: 4 additions & 4 deletions src/Uno.UI/UI/Xaml/Controls/Flyout/FlyoutPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ internal override void OnPropertyChanged2(DependencyPropertyChangedEventArgs arg
{
if (args.Property == AllowFocusOnInteractionProperty)
{
Content?.SetValue(AllowFocusOnInteractionProperty, Boxes.Box(AllowFocusOnInteraction));
Content?.SetValue(AllowFocusOnInteractionProperty, AllowFocusOnInteraction);
}
else if (args.Property == AllowFocusWhenDisabledProperty)
{
Content?.SetValue(AllowFocusWhenDisabledProperty, Boxes.Box(AllowFocusWhenDisabled));
Content?.SetValue(AllowFocusWhenDisabledProperty, AllowFocusWhenDisabled);
}

base.OnPropertyChanged2(args);
Expand All @@ -33,8 +33,8 @@ protected override void OnContentChanged(object oldValue, object newValue)
{
base.OnContentChanged(oldValue, newValue);

Content?.SetValue(AllowFocusOnInteractionProperty, Boxes.Box(AllowFocusOnInteraction));
Content?.SetValue(AllowFocusWhenDisabledProperty, Boxes.Box(AllowFocusWhenDisabled));
Content?.SetValue(AllowFocusOnInteractionProperty, AllowFocusOnInteraction);
Content?.SetValue(AllowFocusWhenDisabledProperty, AllowFocusWhenDisabled);
}

protected override bool CanCreateTemplateWithoutParent { get; } = true;
Expand Down
2 changes: 1 addition & 1 deletion src/Uno.UI/UI/Xaml/Controls/ItemsControl/ItemsControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ internal void PrepareContainerForIndex(DependencyObject container, int index)
_containerBeingPrepared = container;

// This must be set before calling PrepareContainerForItemOverride
container.SetValue(IndexForItemContainerProperty, Boxes.Box(index));
container.SetValue(IndexForItemContainerProperty, index);

var item = ItemFromIndex(index);
PrepareContainerForItemOverride(container, item);
Expand Down
2 changes: 1 addition & 1 deletion src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public static bool GetBringIntoViewOnFocusChange(global::Windows.UI.Xaml.Depende
[global::Uno.NotImplemented]
#endif
public static void SetBringIntoViewOnFocusChange(global::Windows.UI.Xaml.DependencyObject element, bool bringIntoViewOnFocusChange)
=> element.SetValue(BringIntoViewOnFocusChangeProperty, Boxes.Box(bringIntoViewOnFocusChange));
=> element.SetValue(BringIntoViewOnFocusChangeProperty, bringIntoViewOnFocusChange);

#if __IOS__
[global::Uno.NotImplemented]
Expand Down

0 comments on commit e37549b

Please sign in to comment.