Skip to content

Commit 508a3bb

Browse files
Remove Custom Caching Strategy from ImageEx
Too Large an Impact on App Binary Size 675kb
1 parent f1fe78d commit 508a3bb

File tree

3 files changed

+1
-48
lines changed

3 files changed

+1
-48
lines changed

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

Lines changed: 0 additions & 23 deletions
This file was deleted.

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ public partial class ImageExBase
4040
/// </summary>
4141
public static readonly DependencyProperty IsCacheEnabledProperty = DependencyProperty.Register(nameof(IsCacheEnabled), typeof(bool), typeof(ImageExBase), new PropertyMetadata(false));
4242

43-
/// <summary>
44-
/// Identifies the <see cref="CachingStrategy"/> dependency property.
45-
/// </summary>
46-
public static readonly DependencyProperty CachingStrategyProperty = DependencyProperty.Register(nameof(CachingStrategy), typeof(ImageExCachingStrategy), typeof(ImageExBase), new PropertyMetadata(ImageExCachingStrategy.Custom));
47-
4843
/// <summary>
4944
/// Identifies the <see cref="EnableLazyLoading"/> dependency property.
5045
/// </summary>
@@ -126,15 +121,6 @@ public bool IsCacheEnabled
126121
set { SetValue(IsCacheEnabledProperty, value); }
127122
}
128123

129-
/// <summary>
130-
/// Gets or sets a value indicating how the <see cref="ImageEx"/> will be cached.
131-
/// </summary>
132-
public ImageExCachingStrategy CachingStrategy
133-
{
134-
get { return (ImageExCachingStrategy)GetValue(CachingStrategyProperty); }
135-
set { SetValue(CachingStrategyProperty, value); }
136-
}
137-
138124
/// <summary>
139125
/// Gets or sets a value indicating whether gets or sets is lazy loading enable. (17763 or higher supported)
140126
/// </summary>

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,7 @@ private async Task LoadImageAsync(Uri imageUri)
138138
{
139139
if (IsCacheEnabled)
140140
{
141-
switch (CachingStrategy)
142-
{
143-
case ImageExCachingStrategy.Custom when _isHttpSource:
144-
await SetHttpSourceCustomCached(imageUri);
145-
break;
146-
case ImageExCachingStrategy.Custom:
147-
case ImageExCachingStrategy.Internal:
148-
default:
149-
AttachSource(new BitmapImage(imageUri));
150-
break;
151-
}
141+
AttachSource(new BitmapImage(imageUri));
152142
}
153143
else if (string.Equals(_uri.Scheme, "data", StringComparison.OrdinalIgnoreCase))
154144
{

0 commit comments

Comments
 (0)