Skip to content

Commit c43f68a

Browse files
Remove old Unused ProgressRing from ImageEx control
Fixes #3741
1 parent e24db50 commit c43f68a

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

Microsoft.Toolkit.Uwp.UI.Controls.Core/ImageEx/ImageExBase.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
2121
[TemplateVisualState(Name = UnloadedState, GroupName = CommonGroup)]
2222
[TemplateVisualState(Name = FailedState, GroupName = CommonGroup)]
2323
[TemplatePart(Name = PartImage, Type = typeof(object))]
24-
[TemplatePart(Name = PartProgress, Type = typeof(ProgressRing))]
2524
public abstract partial class ImageExBase : Control
2625
{
2726
private bool _isInViewport;
@@ -31,11 +30,6 @@ public abstract partial class ImageExBase : Control
3130
/// </summary>
3231
protected const string PartImage = "Image";
3332

34-
/// <summary>
35-
/// ProgressRing name in template
36-
/// </summary>
37-
protected const string PartProgress = "Progress";
38-
3933
/// <summary>
4034
/// VisualStates name in template
4135
/// </summary>
@@ -66,11 +60,6 @@ public abstract partial class ImageExBase : Control
6660
/// </summary>
6761
protected object Image { get; private set; }
6862

69-
/// <summary>
70-
/// Gets backing object for the ProgressRing
71-
/// </summary>
72-
protected ProgressRing Progress { get; private set; }
73-
7463
/// <summary>
7564
/// Gets object used for lock
7665
/// </summary>
@@ -169,7 +158,6 @@ protected override void OnApplyTemplate()
169158
RemoveImageFailed(OnImageFailed);
170159

171160
Image = GetTemplateChild(PartImage) as object;
172-
Progress = GetTemplateChild(PartProgress) as ProgressRing;
173161

174162
IsInitialized = true;
175163

@@ -191,19 +179,6 @@ protected override void OnApplyTemplate()
191179
base.OnApplyTemplate();
192180
}
193181

194-
/// <inheritdoc/>
195-
protected override Size ArrangeOverride(Size finalSize)
196-
{
197-
var newSquareSize = Math.Min(finalSize.Width, finalSize.Height) / 8.0;
198-
199-
if (Progress?.Width == newSquareSize)
200-
{
201-
Progress.Height = newSquareSize;
202-
}
203-
204-
return base.ArrangeOverride(finalSize);
205-
}
206-
207182
private void OnImageOpened(object sender, RoutedEventArgs e)
208183
{
209184
ImageExOpened?.Invoke(this, new ImageExOpenedEventArgs());

0 commit comments

Comments
 (0)