Skip to content

Commit

Permalink
feat: Support WUX ProgressRing everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Mar 11, 2022
1 parent 794c755 commit eb13011
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 79 deletions.
6 changes: 0 additions & 6 deletions src/Uno.UI/UI/Xaml/Controls/ProgressRing/ProgressRing.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if XAMARIN || UNO_REFERENCE_API
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls.Primitives;
Expand All @@ -15,7 +14,6 @@ public ProgressRing()
DefaultStyleKey = typeof(ProgressRing);
}


/// <summary>
/// Gets or sets a value that indicates whether the <see cref="ProgressRing"/> is showing progress.
/// </summary>
Expand Down Expand Up @@ -45,8 +43,6 @@ private static void OnIsActiveChanged(DependencyObject dependencyObject, Depende

partial void OnIsActiveChangedPartial(bool isActive);

#if !UNO_REFERENCE_API && !__MACOS__ && !__NETSTD_REFERENCE__

private protected override void OnLoaded()
{
base.OnLoaded();
Expand All @@ -64,7 +60,6 @@ private protected override void OnUnloaded()

OnUnloadedPartial();
}
#endif

public Primitives.ProgressRingTemplateSettings TemplateSettings
{
Expand All @@ -84,4 +79,3 @@ public Primitives.ProgressRingTemplateSettings TemplateSettings
}
}
}
#endif
15 changes: 0 additions & 15 deletions src/Uno.UI/UI/Xaml/Controls/ProgressRing/ProgressRing.macOS.cs

This file was deleted.

14 changes: 0 additions & 14 deletions src/Uno.UI/UI/Xaml/Controls/ProgressRing/ProgressRing.net.cs

This file was deleted.

16 changes: 0 additions & 16 deletions src/Uno.UI/UI/Xaml/Controls/ProgressRing/ProgressRing.netstdref.cs

This file was deleted.

16 changes: 0 additions & 16 deletions src/Uno.UI/UI/Xaml/Controls/ProgressRing/ProgressRing.skia.cs

This file was deleted.

12 changes: 6 additions & 6 deletions src/Uno.UI/UI/Xaml/Controls/ProgressRing/ProgressRing.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@


<!-- Default style for Windows.UI.Xaml.Controls.ProgressRing -->
<wasm:Style x:Key="ProgressRingEllipseStyle" TargetType="Ellipse">
<Style x:Key="ProgressRingEllipseStyle" TargetType="Ellipse">
<Setter Property="Opacity" Value="0" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" />
</wasm:Style>
</Style>

<wasm:Style TargetType="ProgressRing">
<Style TargetType="ProgressRing">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{ThemeResource SystemControlHighlightAccentBrush}" />
<Setter Property="IsHitTestVisible" Value="False" />
Expand Down Expand Up @@ -280,9 +280,9 @@
</ControlTemplate>
</Setter.Value>
</Setter>
</wasm:Style>
</Style>

<android:Style TargetType="ProgressRing">
<android:Style TargetType="ProgressRing" x:Key="NativeProgressRingStyle">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ProgressRing">
Expand All @@ -292,7 +292,7 @@
</Setter>
</android:Style>

<ios:Style TargetType="ProgressRing">
<ios:Style TargetType="ProgressRing" x:Key="NativeProgressRingStyle">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ProgressRing">
Expand Down
12 changes: 6 additions & 6 deletions src/Uno.UI/UI/Xaml/Style/mergedstyles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12498,12 +12498,12 @@
</Setter>
</Style>
<!--origin: UI\Xaml\Controls\ProgressRing\ProgressRing.xaml-->
<wasm:Style x:Key="ProgressRingEllipseStyle" TargetType="Ellipse">
<Style x:Key="ProgressRingEllipseStyle" TargetType="Ellipse">
<Setter Property="Opacity" Value="0" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" />
</wasm:Style>
<wasm:Style TargetType="ProgressRing">
</Style>
<Style TargetType="ProgressRing">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{ThemeResource SystemControlHighlightAccentBrush}" />
<Setter Property="IsHitTestVisible" Value="False" />
Expand Down Expand Up @@ -12677,8 +12677,8 @@
</ControlTemplate>
</Setter.Value>
</Setter>
</wasm:Style>
<android:Style TargetType="ProgressRing">
</Style>
<android:Style TargetType="ProgressRing" x:Key="NativeProgressRingStyle">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ProgressRing">
Expand All @@ -12687,7 +12687,7 @@
</Setter.Value>
</Setter>
</android:Style>
<ios:Style TargetType="ProgressRing">
<ios:Style TargetType="ProgressRing" x:Key="NativeProgressRingStyle">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ProgressRing">
Expand Down

0 comments on commit eb13011

Please sign in to comment.