From 7b6503494ded376db4b91775f5295737956d89d7 Mon Sep 17 00:00:00 2001 From: James Croft Date: Wed, 27 Apr 2022 20:34:40 +0100 Subject: [PATCH] Removed MADE.Media.Image --- MADE.NET.sln | 59 ---------------- .../LoadStorageFileThumbnailImageBehavior.cs | 67 ------------------- src/MADE.Media.Image/MADE.Media.Image.csproj | 18 ----- 3 files changed, 144 deletions(-) delete mode 100644 src/MADE.Media.Image/Behaviors/LoadStorageFileThumbnailImageBehavior.cs delete mode 100644 src/MADE.Media.Image/MADE.Media.Image.csproj diff --git a/MADE.NET.sln b/MADE.NET.sln index 9b7662ac..bbb57a9e 100644 --- a/MADE.NET.sln +++ b/MADE.NET.sln @@ -37,8 +37,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MADE.Web.Tests", "tests\MAD EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MADE.Web.Mvc", "src\MADE.Web.Mvc\MADE.Web.Mvc.csproj", "{CF632609-DE29-4375-B887-F0EB2EB6FC80}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MADE.Media.Image", "src\MADE.Media.Image\MADE.Media.Image.csproj", "{3038EDA8-3068-45AD-99A2-36986627B880}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MADE.Networking.Tests", "tests\MADE.Networking.Tests\MADE.Networking.Tests.csproj", "{1CDB43BD-71F9-46C6-816C-4EFC9FA2ED1C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MADE.Data.EFCore", "src\MADE.Data.EFCore\MADE.Data.EFCore.csproj", "{3A5D7EA4-5AD9-4D34-87E6-B34416CA928E}" @@ -921,62 +919,6 @@ Global {CF632609-DE29-4375-B887-F0EB2EB6FC80}.Release|x64.Build.0 = Release|Any CPU {CF632609-DE29-4375-B887-F0EB2EB6FC80}.Release|x86.ActiveCfg = Release|Any CPU {CF632609-DE29-4375-B887-F0EB2EB6FC80}.Release|x86.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Ad-Hoc|ARM64.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Ad-Hoc|ARM64.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.AppStore|Any CPU.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.AppStore|ARM.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.AppStore|ARM.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.AppStore|ARM64.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.AppStore|ARM64.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.AppStore|iPhone.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.AppStore|iPhone.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.AppStore|x64.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.AppStore|x64.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.AppStore|x86.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.AppStore|x86.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Debug|ARM.ActiveCfg = Debug|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Debug|ARM.Build.0 = Debug|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Debug|ARM64.Build.0 = Debug|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Debug|iPhone.Build.0 = Debug|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Debug|x64.ActiveCfg = Debug|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Debug|x64.Build.0 = Debug|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Debug|x86.ActiveCfg = Debug|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Debug|x86.Build.0 = Debug|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Release|Any CPU.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Release|ARM.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Release|ARM.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Release|ARM64.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Release|ARM64.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Release|iPhone.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Release|iPhone.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Release|x64.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Release|x64.Build.0 = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Release|x86.ActiveCfg = Release|Any CPU - {3038EDA8-3068-45AD-99A2-36986627B880}.Release|x86.Build.0 = Release|Any CPU {1CDB43BD-71F9-46C6-816C-4EFC9FA2ED1C}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {1CDB43BD-71F9-46C6-816C-4EFC9FA2ED1C}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {1CDB43BD-71F9-46C6-816C-4EFC9FA2ED1C}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU @@ -1277,7 +1219,6 @@ Global {A7EC4CC5-3800-4104-BAEF-49E8016740CF} = {01380FB8-F8A7-4416-AABA-5407574B7723} {55930DA1-35A4-445A-8028-02D22AFF20DB} = {69149D0F-BB09-411B-88F0-A1E845058D70} {CF632609-DE29-4375-B887-F0EB2EB6FC80} = {01380FB8-F8A7-4416-AABA-5407574B7723} - {3038EDA8-3068-45AD-99A2-36986627B880} = {01380FB8-F8A7-4416-AABA-5407574B7723} {1CDB43BD-71F9-46C6-816C-4EFC9FA2ED1C} = {69149D0F-BB09-411B-88F0-A1E845058D70} {3A5D7EA4-5AD9-4D34-87E6-B34416CA928E} = {01380FB8-F8A7-4416-AABA-5407574B7723} {C8DF10B0-D157-47CF-BD10-9EE1D06BEB9A} = {01380FB8-F8A7-4416-AABA-5407574B7723} diff --git a/src/MADE.Media.Image/Behaviors/LoadStorageFileThumbnailImageBehavior.cs b/src/MADE.Media.Image/Behaviors/LoadStorageFileThumbnailImageBehavior.cs deleted file mode 100644 index 5d699f6a..00000000 --- a/src/MADE.Media.Image/Behaviors/LoadStorageFileThumbnailImageBehavior.cs +++ /dev/null @@ -1,67 +0,0 @@ -// MADE Apps licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace MADE.Media.Image.Behaviors -{ - using System; - using System.Threading.Tasks; - using Microsoft.Xaml.Interactivity; - using Windows.Storage; - using Windows.Storage.FileProperties; - using Windows.UI.Xaml; - using Windows.UI.Xaml.Controls; - using Windows.UI.Xaml.Media.Imaging; - - /// - /// Defines a behavior for loading a storage file's thumbnail image into a control. - /// - public class LoadStorageFileThumbnailImageBehavior : Behavior - { - /// - /// Identifies the dependency property. - /// - public static readonly DependencyProperty FileProperty = DependencyProperty.Register( - nameof(File), - typeof(StorageFile), - typeof(LoadStorageFileThumbnailImageBehavior), - new PropertyMetadata( - null, - async (d, e) => - await ((LoadStorageFileThumbnailImageBehavior)d).UpdateImageSourceAsync((StorageFile)e.NewValue))); - - /// - /// Gets or sets the storage file to retrieve a thumbnail for. - /// - public StorageFile File - { - get => (StorageFile)this.GetValue(FileProperty); - set => this.SetValue(FileProperty, value); - } - - private async Task UpdateImageSourceAsync(IStorageItemProperties file) - { - if (file == null) - { - return; - } - - StorageItemThumbnail thumbnail = await file.GetThumbnailAsync( - ThumbnailMode.SingleItem, - 256, - ThumbnailOptions.ResizeThumbnail); - - if (thumbnail == null) - { - return; - } - - if (this.AssociatedObject != null) - { - var bitmapImage = new BitmapImage(); - bitmapImage.SetSource(thumbnail.CloneStream()); - - this.AssociatedObject.Source = bitmapImage; - } - } - } -} diff --git a/src/MADE.Media.Image/MADE.Media.Image.csproj b/src/MADE.Media.Image/MADE.Media.Image.csproj deleted file mode 100644 index 898b3184..00000000 --- a/src/MADE.Media.Image/MADE.Media.Image.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - uap10.0.17763 - true - MADE.NET Images - - This package includes: - - LoadStorageFileThumbnailImageBehavior for providing the ability to show a thumbnail for a storage file on an Image. - - MADE Media Images Thumbnail StorageFile - - - - - - - \ No newline at end of file