From 7b6503494ded376db4b91775f5295737956d89d7 Mon Sep 17 00:00:00 2001 From: James Croft Date: Wed, 27 Apr 2022 20:34:40 +0100 Subject: [PATCH 1/2] 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 From 6c4b48ad7414b85228ec12ada118ea6959989d7e Mon Sep 17 00:00:00 2001 From: James Croft Date: Wed, 27 Apr 2022 20:57:58 +0100 Subject: [PATCH 2/2] Updated docs --- .github/ISSUE_TEMPLATE/bug.yml | 2 +- README.md | 1 - docs/articles/features/media-image.md | 43 --------------------------- docs/articles/intro.md | 15 ---------- 4 files changed, 1 insertion(+), 60 deletions(-) delete mode 100644 docs/articles/features/media-image.md diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 43089c70..f88b97d2 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -22,9 +22,9 @@ body: - "Data.EFCore" - "Data.Security" - "Data.Validation" + - "Data.Validation.FluentValidation" - "Diagnostics" - "Foundation" - - "Media.Image" - "Networking" - "Runtime" - "Testing" diff --git a/README.md b/README.md index 4491573d..b3dc8761 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,6 @@ As many developers know, projects like MADE.NET are built and maintained in spar | Data.Validation | [![NuGet](https://img.shields.io/nuget/v/MADE.Data.Validation)](https://www.nuget.org/packages/MADE.Data.Validation/) | [![NuGet](https://img.shields.io/nuget/vpre/MADE.Data.Validation)](https://www.nuget.org/packages/MADE.Data.Validation/) | [![NuGet Downloads](https://img.shields.io/nuget/dt/MADE.Data.Validation.svg)](https://www.nuget.org/packages/MADE.Data.Validation) | | Diagnostics | [![NuGet](https://img.shields.io/nuget/v/MADE.Diagnostics)](https://www.nuget.org/packages/MADE.Diagnostics/) | [![NuGet](https://img.shields.io/nuget/vpre/MADE.Diagnostics)](https://www.nuget.org/packages/MADE.Diagnostics/) | [![NuGet Downloads](https://img.shields.io/nuget/dt/MADE.Diagnostics.svg)](https://www.nuget.org/packages/MADE.Diagnostics) | | Foundation | [![NuGet](https://img.shields.io/nuget/v/MADE.Foundation)](https://www.nuget.org/packages/MADE.Foundation/) | [![NuGet](https://img.shields.io/nuget/vpre/MADE.Foundation)](https://www.nuget.org/packages/MADE.Foundation/) | [![NuGet Downloads](https://img.shields.io/nuget/dt/MADE.Foundation.svg)](https://www.nuget.org/packages/MADE.Foundation) | -| Media.Image | [![NuGet](https://img.shields.io/nuget/v/MADE.Media.Image)](https://www.nuget.org/packages/MADE.Media.Image/) | [![NuGet](https://img.shields.io/nuget/vpre/MADE.Media.Image)](https://www.nuget.org/packages/MADE.Media.Image/) | [![NuGet Downloads](https://img.shields.io/nuget/dt/MADE.Media.Image.svg)](https://www.nuget.org/packages/MADE.Media.Image) | | Networking | [![NuGet](https://img.shields.io/nuget/v/MADE.Networking)](https://www.nuget.org/packages/MADE.Networking/) | [![NuGet](https://img.shields.io/nuget/vpre/MADE.Networking)](https://www.nuget.org/packages/MADE.Networking/) | [![NuGet Downloads](https://img.shields.io/nuget/dt/MADE.Networking.svg)](https://www.nuget.org/packages/MADE.Networking) | | Runtime | [![NuGet](https://img.shields.io/nuget/v/MADE.Runtime)](https://www.nuget.org/packages/MADE.Runtime/) | [![NuGet](https://img.shields.io/nuget/vpre/MADE.Runtime)](https://www.nuget.org/packages/MADE.Runtime/) | [![NuGet Downloads](https://img.shields.io/nuget/dt/MADE.Runtime.svg)](https://www.nuget.org/packages/MADE.Runtime) | | Testing | [![NuGet](https://img.shields.io/nuget/v/MADE.Testing)](https://www.nuget.org/packages/MADE.Testing/) | [![NuGet](https://img.shields.io/nuget/vpre/MADE.Testing)](https://www.nuget.org/packages/MADE.Testing/) | [![NuGet Downloads](https://img.shields.io/nuget/dt/MADE.Testing.svg)](https://www.nuget.org/packages/MADE.Testing) | diff --git a/docs/articles/features/media-image.md b/docs/articles/features/media-image.md deleted file mode 100644 index 2ee22f89..00000000 --- a/docs/articles/features/media-image.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -uid: package-media-image -title: Using the Media Image package ---- - -# Using the Media Image package - -The Media Image package is designed to be used in applications that require image processing. - -## Loading Windows StorageFile thumbnails into an Image with LoadStorageFileThumbnailImageBehavior - -The `MADE.Media.Image.Behaviors.LoadStorageFileThumbnailImageBehavior` is a custom behavior built on the [Microsoft XAML behaviors SDK](https://github.com/Microsoft/XamlBehaviors). - -It can be attached to an `Image` UI element and used to load the thumbnail of a `StorageFile`. - -You can do this in your Windows XAML as shown below. - -```xml - - - - - - - - - - - -``` - -This could result in a generated UI that looks like this. - -Result of using LoadStorageFileThumbnailImageBehavior diff --git a/docs/articles/intro.md b/docs/articles/intro.md index 2ffce0c4..2996a4f8 100644 --- a/docs/articles/intro.md +++ b/docs/articles/intro.md @@ -31,7 +31,6 @@ dotnet add package MADE.Collections | MADE.Data.Validation | [![NuGet](https://img.shields.io/nuget/v/MADE.Data.Validation)](https://www.nuget.org/packages/MADE.Data.Validation/) | | MADE.Data.Validation.FluentValidation | [![NuGet](https://img.shields.io/nuget/v/MADE.Data.Validation.FluentValidation)](https://www.nuget.org/packages/MADE.Data.Validation.FluentValidation/) | | MADE.Diagnostics | [![NuGet](https://img.shields.io/nuget/v/MADE.Diagnostics)](https://www.nuget.org/packages/MADE.Diagnostics/) | -| MADE.Media.Image | [![NuGet](https://img.shields.io/nuget/v/MADE.Media.Image)](https://www.nuget.org/packages/MADE.Media.Image/) | | MADE.Networking | [![NuGet](https://img.shields.io/nuget/v/MADE.Networking)](https://www.nuget.org/packages/MADE.Networking/) | | MADE.Runtime | [![NuGet](https://img.shields.io/nuget/v/MADE.Runtime)](https://www.nuget.org/packages/MADE.Runtime/) | | MADE.Testing | [![NuGet](https://img.shields.io/nuget/v/MADE.Testing)](https://www.nuget.org/packages/MADE.Testing/) | @@ -126,20 +125,6 @@ It includes features such as: -#### Media.Image - -The Media Image package is designed to be used in applications that require image processing. - -It provides capabilities, such as: - -- LoadStorageFileThumbnailImageBehavior, a UWP XAML behavior for loading a thumbnail from a `StorageFile` on an `Image` element. - - - -[Discover Media.Image](features/media-image.md) - - - #### Networking The Networking package contains a collection of helpers for applications that use `HttpClient` for making network requests to APIs.