From c459f61754d513a6a60f4173c57bb9e910b36ed3 Mon Sep 17 00:00:00 2001 From: Martin Topfstedt Date: Tue, 19 May 2020 20:30:28 +0200 Subject: [PATCH] improvements --- README.md | 2 +- build/build.yml | 12 +- src/Examples/FontAwesome5.Examples.sln | 67 ++---- .../FontAwesome5.Net40.Example.csproj | 6 +- .../FontAwesome5.NetCore30.Example.csproj | 1 - .../Extensions/ControlExtensions.cs | 20 +- .../Extensions/EFontAwesomeIconExtensions.cs | 22 +- .../FontAwesome.Shared.projitems | 18 ++ .../FontAwesome.Shared.shproj | 13 ++ .../IFlippable.cs | 2 + .../IRotatable.cs | 0 .../ISpinable.cs | 0 ...me5.NetCore30.sln => FontAwesome5.Net.sln} | 34 +-- .../Awesome.cs | 0 .../Converters/ImageSourceConverter.cs | 0 .../Converters/LabelConverter.cs | 0 .../Converters/StyleConverter.cs | 0 .../FontAwesome.cs | 0 .../FontAwesome5.Net.csproj} | 9 +- .../Fonts.cs | 0 .../ImageAwesome.cs | 0 .../Key.snk | Bin .../SvgAwesome.cs | 0 .../XmlNamespace.cs | 0 src/FontAwesome5.Net40.sln | 93 -------- .../Converters/ImageSourceConverter.cs | 39 ---- .../Extensions/ControlExtensions.cs | 134 ----------- .../FontAwesome5.Net40.csproj | 106 --------- src/FontAwesome5.Net40/Fonts.cs | 42 ---- src/FontAwesome5.Net40/ImageAwesome.cs | 212 ----------------- .../Properties/AssemblyInfo.cs | 41 ---- src/FontAwesome5.Net40/SvgAwesome.cs | 219 ------------------ src/FontAwesome5.NetCore30/Awesome.cs | 61 ----- .../Converters/LabelConverter.cs | 39 ---- .../Converters/StyleConverter.cs | 34 --- .../Extensions/EFontAwesomeIconExtensions.cs | 49 ---- src/FontAwesome5.NetCore30/FontAwesome.cs | 179 -------------- src/FontAwesome5.NetCore30/IFlippable.cs | 40 ---- src/FontAwesome5.NetCore30/IRotatable.cs | 19 -- src/FontAwesome5.NetCore30/ISpinable.cs | 24 -- src/FontAwesome5.NetCore30/Key.snk | Bin 596 -> 0 bytes .../Extensions/ControlExtensions.cs | 142 ------------ .../Extensions/EFontAwesomeIconExtensions.cs | 30 --- src/FontAwesome5.UWP/FontAwesome5.UWP.csproj | 6 +- src/FontAwesome5.UWP/IFlippable.cs | 39 ---- src/FontAwesome5.UWP/IRotatable.cs | 19 -- src/FontAwesome5.UWP/ISpinable.cs | 24 -- src/FontAwesome5.sln | 69 +++--- src/FontAwesome5/FontAwesome5.csproj | 2 +- src/NuGet/FontAwesome5.nuspec | 49 ++-- 50 files changed, 177 insertions(+), 1740 deletions(-) rename src/{FontAwesome5.NetCore30 => FontAwesome.Shared}/Extensions/ControlExtensions.cs (91%) rename src/{FontAwesome5.Net40 => FontAwesome.Shared}/Extensions/EFontAwesomeIconExtensions.cs (77%) create mode 100644 src/FontAwesome.Shared/FontAwesome.Shared.projitems create mode 100644 src/FontAwesome.Shared/FontAwesome.Shared.shproj rename src/{FontAwesome5.Net40 => FontAwesome.Shared}/IFlippable.cs (96%) rename src/{FontAwesome5.Net40 => FontAwesome.Shared}/IRotatable.cs (100%) rename src/{FontAwesome5.Net40 => FontAwesome.Shared}/ISpinable.cs (100%) rename src/{FontAwesome5.NetCore30.sln => FontAwesome5.Net.sln} (80%) rename src/{FontAwesome5.Net40 => FontAwesome5.Net}/Awesome.cs (100%) rename src/{FontAwesome5.NetCore30 => FontAwesome5.Net}/Converters/ImageSourceConverter.cs (100%) rename src/{FontAwesome5.Net40 => FontAwesome5.Net}/Converters/LabelConverter.cs (100%) rename src/{FontAwesome5.Net40 => FontAwesome5.Net}/Converters/StyleConverter.cs (100%) rename src/{FontAwesome5.Net40 => FontAwesome5.Net}/FontAwesome.cs (100%) rename src/{FontAwesome5.NetCore30/FontAwesome5.NetCore30.csproj => FontAwesome5.Net/FontAwesome5.Net.csproj} (76%) rename src/{FontAwesome5.NetCore30 => FontAwesome5.Net}/Fonts.cs (100%) rename src/{FontAwesome5.NetCore30 => FontAwesome5.Net}/ImageAwesome.cs (100%) rename src/{FontAwesome5.Net40 => FontAwesome5.Net}/Key.snk (100%) rename src/{FontAwesome5.NetCore30 => FontAwesome5.Net}/SvgAwesome.cs (100%) rename src/{FontAwesome5.NetCore30 => FontAwesome5.Net}/XmlNamespace.cs (100%) delete mode 100644 src/FontAwesome5.Net40.sln delete mode 100644 src/FontAwesome5.Net40/Converters/ImageSourceConverter.cs delete mode 100644 src/FontAwesome5.Net40/Extensions/ControlExtensions.cs delete mode 100644 src/FontAwesome5.Net40/FontAwesome5.Net40.csproj delete mode 100644 src/FontAwesome5.Net40/Fonts.cs delete mode 100644 src/FontAwesome5.Net40/ImageAwesome.cs delete mode 100644 src/FontAwesome5.Net40/Properties/AssemblyInfo.cs delete mode 100644 src/FontAwesome5.Net40/SvgAwesome.cs delete mode 100644 src/FontAwesome5.NetCore30/Awesome.cs delete mode 100644 src/FontAwesome5.NetCore30/Converters/LabelConverter.cs delete mode 100644 src/FontAwesome5.NetCore30/Converters/StyleConverter.cs delete mode 100644 src/FontAwesome5.NetCore30/Extensions/EFontAwesomeIconExtensions.cs delete mode 100644 src/FontAwesome5.NetCore30/FontAwesome.cs delete mode 100644 src/FontAwesome5.NetCore30/IFlippable.cs delete mode 100644 src/FontAwesome5.NetCore30/IRotatable.cs delete mode 100644 src/FontAwesome5.NetCore30/ISpinable.cs delete mode 100644 src/FontAwesome5.NetCore30/Key.snk delete mode 100644 src/FontAwesome5.UWP/Extensions/ControlExtensions.cs delete mode 100644 src/FontAwesome5.UWP/Extensions/EFontAwesomeIconExtensions.cs delete mode 100644 src/FontAwesome5.UWP/IFlippable.cs delete mode 100644 src/FontAwesome5.UWP/IRotatable.cs delete mode 100644 src/FontAwesome5.UWP/ISpinable.cs diff --git a/README.md b/README.md index 4848f32..54ad35a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://dev.azure.com/codinion/FontAwesome5/_apis/build/status/MartinTopfstedt.FontAwesome5?branchName=master)](https://dev.azure.com/codinion/FontAwesome5/_build/latest?definitionId=11&branchName=master) -WPF (.Net and .Net Core 3.0) and UWP controls for the iconic SVG, font, and CSS toolkit Font Awesome 5. +WPF (.Net and .Net Core) and UWP controls for the iconic SVG, font, and CSS toolkit Font Awesome 5. Font Awesome: https://github.com/FortAwesome/Font-Awesome diff --git a/build/build.yml b/build/build.yml index baf1168..4e46694 100644 --- a/build/build.yml +++ b/build/build.yml @@ -65,20 +65,12 @@ steps: workingDirectory: '.' - task: DotNetCoreCLI@2 - displayName: 'Build: Net Core 3.0' + displayName: 'Build: Net Core' inputs: command: 'build' - projects: 'src/FontAwesome5.NetCore30.sln' + projects: 'src/FontAwesome5.Net.sln' arguments: '--configuration $(buildConfiguration) /p:Version=$(GitVersion.AssemblySemVer);AssemblyVersion=$(GitVersion.AssemblySemVer);FileVersion=$(GitVersion.AssemblySemFileVer)' -- task: VSBuild@1 - displayName: 'Build: Net 4.0' - inputs: - solution: 'src/FontAwesome5.Net40.sln' - msbuildArgs: '/p:Version=$(GitVersion.AssemblySemVer);AssemblyVersion=$(GitVersion.AssemblySemVer);FileVersion=$(GitVersion.AssemblySemFileVer)' - platform: '$(buildPlatform)' - configuration: '$(buildConfiguration)' - - task: VSBuild@1 displayName: 'Build: UWP' inputs: diff --git a/src/Examples/FontAwesome5.Examples.sln b/src/Examples/FontAwesome5.Examples.sln index 996bb2b..fdfc37b 100644 --- a/src/Examples/FontAwesome5.Examples.sln +++ b/src/Examples/FontAwesome5.Examples.sln @@ -15,9 +15,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FontAwesome5.Net40.Example" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FontAwesome5.NetCore30.Example", "FontAwesome5.NetCore30.Example\FontAwesome5.NetCore30.Example.csproj", "{332373B0-DBF9-4CB5-86A4-DF2D3F873CF7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FontAwesome5.Net40", "..\FontAwesome5.Net40\FontAwesome5.Net40.csproj", "{064DF8AB-301D-4A3D-883F-2243DAA66605}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FontAwesome5.NetCore30", "..\FontAwesome5.NetCore30\FontAwesome5.NetCore30.csproj", "{A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FontAwesome5.Net", "..\FontAwesome5.Net\FontAwesome5.Net.csproj", "{1A59D62E-5831-4D38-92AF-6EAEF5DB3395}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -137,46 +135,26 @@ Global {332373B0-DBF9-4CB5-86A4-DF2D3F873CF7}.Release|x64.Build.0 = Release|Any CPU {332373B0-DBF9-4CB5-86A4-DF2D3F873CF7}.Release|x86.ActiveCfg = Release|Any CPU {332373B0-DBF9-4CB5-86A4-DF2D3F873CF7}.Release|x86.Build.0 = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|Any CPU.Build.0 = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|ARM.ActiveCfg = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|ARM.Build.0 = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|ARM64.Build.0 = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|x64.ActiveCfg = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|x64.Build.0 = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|x86.ActiveCfg = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|x86.Build.0 = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|Any CPU.ActiveCfg = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|Any CPU.Build.0 = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|ARM.ActiveCfg = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|ARM.Build.0 = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|ARM64.ActiveCfg = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|ARM64.Build.0 = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|x64.ActiveCfg = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|x64.Build.0 = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|x86.ActiveCfg = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|x86.Build.0 = Release|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Debug|ARM.ActiveCfg = Debug|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Debug|ARM.Build.0 = Debug|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Debug|ARM64.Build.0 = Debug|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Debug|x64.ActiveCfg = Debug|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Debug|x64.Build.0 = Debug|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Debug|x86.ActiveCfg = Debug|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Debug|x86.Build.0 = Debug|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Release|Any CPU.Build.0 = Release|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Release|ARM.ActiveCfg = Release|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Release|ARM.Build.0 = Release|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Release|ARM64.ActiveCfg = Release|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Release|ARM64.Build.0 = Release|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Release|x64.ActiveCfg = Release|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Release|x64.Build.0 = Release|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Release|x86.ActiveCfg = Release|Any CPU - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF}.Release|x86.Build.0 = Release|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Debug|ARM.ActiveCfg = Debug|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Debug|ARM.Build.0 = Debug|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Debug|ARM64.Build.0 = Debug|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Debug|x64.ActiveCfg = Debug|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Debug|x64.Build.0 = Debug|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Debug|x86.ActiveCfg = Debug|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Debug|x86.Build.0 = Debug|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Release|Any CPU.Build.0 = Release|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Release|ARM.ActiveCfg = Release|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Release|ARM.Build.0 = Release|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Release|ARM64.ActiveCfg = Release|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Release|ARM64.Build.0 = Release|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Release|x64.ActiveCfg = Release|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Release|x64.Build.0 = Release|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Release|x86.ActiveCfg = Release|Any CPU + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -184,8 +162,7 @@ Global GlobalSection(NestedProjects) = preSolution {3DA649D8-590A-4BBD-8181-F01BC81748B7} = {91E6A385-8848-4CE1-BC5C-41D5B79DE86F} {30C458C0-E963-4972-B9D3-8FB51E434F7C} = {91E6A385-8848-4CE1-BC5C-41D5B79DE86F} - {064DF8AB-301D-4A3D-883F-2243DAA66605} = {91E6A385-8848-4CE1-BC5C-41D5B79DE86F} - {A01EBBAF-6DF2-40B7-80AC-D19750F0B0DF} = {91E6A385-8848-4CE1-BC5C-41D5B79DE86F} + {1A59D62E-5831-4D38-92AF-6EAEF5DB3395} = {91E6A385-8848-4CE1-BC5C-41D5B79DE86F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {61A8E116-9C47-41CA-8F8F-B830C6FF7B62} diff --git a/src/Examples/FontAwesome5.Net40.Example/FontAwesome5.Net40.Example.csproj b/src/Examples/FontAwesome5.Net40.Example/FontAwesome5.Net40.Example.csproj index 7db84a2..6db38bc 100644 --- a/src/Examples/FontAwesome5.Net40.Example/FontAwesome5.Net40.Example.csproj +++ b/src/Examples/FontAwesome5.Net40.Example/FontAwesome5.Net40.Example.csproj @@ -120,9 +120,9 @@ - - {064df8ab-301d-4a3d-883f-2243daa66605} - FontAwesome5.Net40 + + {1a59d62e-5831-4d38-92af-6eaef5db3395} + FontAwesome5.Net {30c458c0-e963-4972-b9d3-8fb51e434f7c} diff --git a/src/Examples/FontAwesome5.NetCore30.Example/FontAwesome5.NetCore30.Example.csproj b/src/Examples/FontAwesome5.NetCore30.Example/FontAwesome5.NetCore30.Example.csproj index 40256e8..f2edfe3 100644 --- a/src/Examples/FontAwesome5.NetCore30.Example/FontAwesome5.NetCore30.Example.csproj +++ b/src/Examples/FontAwesome5.NetCore30.Example/FontAwesome5.NetCore30.Example.csproj @@ -11,7 +11,6 @@ - diff --git a/src/FontAwesome5.NetCore30/Extensions/ControlExtensions.cs b/src/FontAwesome.Shared/Extensions/ControlExtensions.cs similarity index 91% rename from src/FontAwesome5.NetCore30/Extensions/ControlExtensions.cs rename to src/FontAwesome.Shared/Extensions/ControlExtensions.cs index cc28d8a..9807ed7 100644 --- a/src/FontAwesome5.NetCore30/Extensions/ControlExtensions.cs +++ b/src/FontAwesome.Shared/Extensions/ControlExtensions.cs @@ -1,10 +1,17 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; + +#if WINDOWS_UWP +using Windows.Foundation; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Media.Animation; +#else using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; +#endif namespace FontAwesome5.Extensions { @@ -36,7 +43,7 @@ public static void BeginSpin(this T control) } else { - transformGroup.Children.Add(new RotateTransform(0.0)); + transformGroup.Children.Add(new RotateTransform() { Angle = 0.0 }); control.RenderTransform = transformGroup; control.RenderTransformOrigin = new Point(0.5, 0.5); } @@ -54,10 +61,13 @@ public static void BeginSpin(this T control) storyboard.Children.Add(animation); Storyboard.SetTarget(animation, control); +#if WINDOWS_UWP + Storyboard.SetTargetProperty(animation, "(FrameworkElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)"); +#else Storyboard.SetTargetProperty(animation, new PropertyPath("(0).(1)[0].(2)", UIElement.RenderTransformProperty, TransformGroup.ChildrenProperty, RotateTransform.AngleProperty)); - +#endif storyboard.Begin(); control.Resources.Add(SpinnerStoryBoardName, storyboard); } @@ -97,7 +107,7 @@ public static void SetRotation(this T control) } else { - transformGroup.Children.Add(new RotateTransform(control.Rotation)); + transformGroup.Children.Add(new RotateTransform() { Angle = control.Rotation }); control.RenderTransform = transformGroup; control.RenderTransformOrigin = new Point(0.5, 0.5); } @@ -125,7 +135,7 @@ public static void SetFlipOrientation(this T control) } else { - transformGroup.Children.Add(new ScaleTransform(scaleX, scaleY)); + transformGroup.Children.Add(new ScaleTransform() { ScaleX = scaleX, ScaleY = scaleY }); control.RenderTransform = transformGroup; control.RenderTransformOrigin = new Point(0.5, 0.5); } diff --git a/src/FontAwesome5.Net40/Extensions/EFontAwesomeIconExtensions.cs b/src/FontAwesome.Shared/Extensions/EFontAwesomeIconExtensions.cs similarity index 77% rename from src/FontAwesome5.Net40/Extensions/EFontAwesomeIconExtensions.cs rename to src/FontAwesome.Shared/Extensions/EFontAwesomeIconExtensions.cs index e4ed1d3..f060d94 100644 --- a/src/FontAwesome5.Net40/Extensions/EFontAwesomeIconExtensions.cs +++ b/src/FontAwesome.Shared/Extensions/EFontAwesomeIconExtensions.cs @@ -1,6 +1,9 @@ using FontAwesome5.Extensions; +#if WINDOWS_UWP +using Windows.UI.Xaml.Media; +#else using System.Windows.Media; - +#endif namespace FontAwesome5.Extensions { /// @@ -8,6 +11,7 @@ namespace FontAwesome5.Extensions /// public static class EFontAwesomeIconExtensions { +#if !WINDOWS_UWP /// /// Get the Typeface of an icon /// @@ -17,16 +21,16 @@ public static Typeface GetTypeFace(this EFontAwesomeIcon icon) if (info == null) return Fonts.RegularTypeface; - switch (info.Style) + return info.Style switch { - case EFontAwesomeStyle.Regular: return Fonts.RegularTypeface; - case EFontAwesomeStyle.Solid: return Fonts.SolidTypeface; - case EFontAwesomeStyle.Brands: return Fonts.BrandsTypeface; - } + EFontAwesomeStyle.Regular => Fonts.RegularTypeface, + EFontAwesomeStyle.Solid => Fonts.SolidTypeface, + EFontAwesomeStyle.Brands => Fonts.BrandsTypeface, - return null; + _ => null, + }; } - +#endif /// /// Get the FontFamily of an icon /// @@ -35,7 +39,7 @@ public static FontFamily GetFontFamily(this EFontAwesomeIcon icon) var info = icon.GetInformationAttribute(); if (info == null) return Fonts.RegularFontFamily; - + switch (info.Style) { case EFontAwesomeStyle.Regular: return Fonts.RegularFontFamily; diff --git a/src/FontAwesome.Shared/FontAwesome.Shared.projitems b/src/FontAwesome.Shared/FontAwesome.Shared.projitems new file mode 100644 index 0000000..c0f3d7d --- /dev/null +++ b/src/FontAwesome.Shared/FontAwesome.Shared.projitems @@ -0,0 +1,18 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + 2f36f2df-f8b2-49cb-91e7-e5c88e3a96d5 + + + FontAwesome.Shared + + + + + + + + + \ No newline at end of file diff --git a/src/FontAwesome.Shared/FontAwesome.Shared.shproj b/src/FontAwesome.Shared/FontAwesome.Shared.shproj new file mode 100644 index 0000000..6ac4284 --- /dev/null +++ b/src/FontAwesome.Shared/FontAwesome.Shared.shproj @@ -0,0 +1,13 @@ + + + + 2f36f2df-f8b2-49cb-91e7-e5c88e3a96d5 + 14.0 + + + + + + + + diff --git a/src/FontAwesome5.Net40/IFlippable.cs b/src/FontAwesome.Shared/IFlippable.cs similarity index 96% rename from src/FontAwesome5.Net40/IFlippable.cs rename to src/FontAwesome.Shared/IFlippable.cs index 0aee27f..12ae2a6 100644 --- a/src/FontAwesome5.Net40/IFlippable.cs +++ b/src/FontAwesome.Shared/IFlippable.cs @@ -10,7 +10,9 @@ namespace FontAwesome5 /// /// Defines the different flip orientations that a icon can have. /// + #if !WINDOWS_UWP [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] + #endif public enum EFlipOrientation { /// diff --git a/src/FontAwesome5.Net40/IRotatable.cs b/src/FontAwesome.Shared/IRotatable.cs similarity index 100% rename from src/FontAwesome5.Net40/IRotatable.cs rename to src/FontAwesome.Shared/IRotatable.cs diff --git a/src/FontAwesome5.Net40/ISpinable.cs b/src/FontAwesome.Shared/ISpinable.cs similarity index 100% rename from src/FontAwesome5.Net40/ISpinable.cs rename to src/FontAwesome.Shared/ISpinable.cs diff --git a/src/FontAwesome5.NetCore30.sln b/src/FontAwesome5.Net.sln similarity index 80% rename from src/FontAwesome5.NetCore30.sln rename to src/FontAwesome5.Net.sln index 93bbd63..f5d45a3 100644 --- a/src/FontAwesome5.NetCore30.sln +++ b/src/FontAwesome5.Net.sln @@ -19,7 +19,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{5DB18EB6 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FontAwesome5.Generator", "Tools\FontAwesome5.Generator\FontAwesome5.Generator.csproj", "{36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FontAwesome5.NetCore30", "FontAwesome5.NetCore30\FontAwesome5.NetCore30.csproj", "{AC444839-F0A4-47CE-B919-B9C1E33EF5D4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FontAwesome5.Net", "FontAwesome5.Net\FontAwesome5.Net.csproj", "{E3B67831-928E-4B93-8249-3BAB7E52AE3F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -64,22 +64,22 @@ Global {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Release|x64.Build.0 = Release|Any CPU {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Release|x86.ActiveCfg = Release|Any CPU {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Release|x86.Build.0 = Release|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Debug|ARM.ActiveCfg = Debug|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Debug|ARM.Build.0 = Debug|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Debug|x64.ActiveCfg = Debug|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Debug|x64.Build.0 = Debug|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Debug|x86.ActiveCfg = Debug|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Debug|x86.Build.0 = Debug|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Release|Any CPU.Build.0 = Release|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Release|ARM.ActiveCfg = Release|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Release|ARM.Build.0 = Release|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Release|x64.ActiveCfg = Release|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Release|x64.Build.0 = Release|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Release|x86.ActiveCfg = Release|Any CPU - {AC444839-F0A4-47CE-B919-B9C1E33EF5D4}.Release|x86.Build.0 = Release|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Debug|ARM.ActiveCfg = Debug|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Debug|ARM.Build.0 = Debug|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Debug|x64.ActiveCfg = Debug|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Debug|x64.Build.0 = Debug|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Debug|x86.ActiveCfg = Debug|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Debug|x86.Build.0 = Debug|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Release|Any CPU.Build.0 = Release|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Release|ARM.ActiveCfg = Release|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Release|ARM.Build.0 = Release|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Release|x64.ActiveCfg = Release|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Release|x64.Build.0 = Release|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Release|x86.ActiveCfg = Release|Any CPU + {E3B67831-928E-4B93-8249-3BAB7E52AE3F}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/FontAwesome5.Net40/Awesome.cs b/src/FontAwesome5.Net/Awesome.cs similarity index 100% rename from src/FontAwesome5.Net40/Awesome.cs rename to src/FontAwesome5.Net/Awesome.cs diff --git a/src/FontAwesome5.NetCore30/Converters/ImageSourceConverter.cs b/src/FontAwesome5.Net/Converters/ImageSourceConverter.cs similarity index 100% rename from src/FontAwesome5.NetCore30/Converters/ImageSourceConverter.cs rename to src/FontAwesome5.Net/Converters/ImageSourceConverter.cs diff --git a/src/FontAwesome5.Net40/Converters/LabelConverter.cs b/src/FontAwesome5.Net/Converters/LabelConverter.cs similarity index 100% rename from src/FontAwesome5.Net40/Converters/LabelConverter.cs rename to src/FontAwesome5.Net/Converters/LabelConverter.cs diff --git a/src/FontAwesome5.Net40/Converters/StyleConverter.cs b/src/FontAwesome5.Net/Converters/StyleConverter.cs similarity index 100% rename from src/FontAwesome5.Net40/Converters/StyleConverter.cs rename to src/FontAwesome5.Net/Converters/StyleConverter.cs diff --git a/src/FontAwesome5.Net40/FontAwesome.cs b/src/FontAwesome5.Net/FontAwesome.cs similarity index 100% rename from src/FontAwesome5.Net40/FontAwesome.cs rename to src/FontAwesome5.Net/FontAwesome.cs diff --git a/src/FontAwesome5.NetCore30/FontAwesome5.NetCore30.csproj b/src/FontAwesome5.Net/FontAwesome5.Net.csproj similarity index 76% rename from src/FontAwesome5.NetCore30/FontAwesome5.NetCore30.csproj rename to src/FontAwesome5.Net/FontAwesome5.Net.csproj index f33c239..5c65919 100644 --- a/src/FontAwesome5.NetCore30/FontAwesome5.NetCore30.csproj +++ b/src/FontAwesome5.Net/FontAwesome5.Net.csproj @@ -1,17 +1,18 @@  - netcoreapp3.0 + net40;net462;net472;netcoreapp3.0;netcoreapp3.1 true true Key.snk false - FontAwesome5.NetCore30 + FontAwesome5.Net FontAwesome5 + latest - $(OutDir)\FontAwesome5.NetCore30.xml + $(OutDir)\FontAwesome5.Net.xml Martin Topfstedt MIT Copyright © Codinion 2018 @@ -32,4 +33,6 @@ + + diff --git a/src/FontAwesome5.NetCore30/Fonts.cs b/src/FontAwesome5.Net/Fonts.cs similarity index 100% rename from src/FontAwesome5.NetCore30/Fonts.cs rename to src/FontAwesome5.Net/Fonts.cs diff --git a/src/FontAwesome5.NetCore30/ImageAwesome.cs b/src/FontAwesome5.Net/ImageAwesome.cs similarity index 100% rename from src/FontAwesome5.NetCore30/ImageAwesome.cs rename to src/FontAwesome5.Net/ImageAwesome.cs diff --git a/src/FontAwesome5.Net40/Key.snk b/src/FontAwesome5.Net/Key.snk similarity index 100% rename from src/FontAwesome5.Net40/Key.snk rename to src/FontAwesome5.Net/Key.snk diff --git a/src/FontAwesome5.NetCore30/SvgAwesome.cs b/src/FontAwesome5.Net/SvgAwesome.cs similarity index 100% rename from src/FontAwesome5.NetCore30/SvgAwesome.cs rename to src/FontAwesome5.Net/SvgAwesome.cs diff --git a/src/FontAwesome5.NetCore30/XmlNamespace.cs b/src/FontAwesome5.Net/XmlNamespace.cs similarity index 100% rename from src/FontAwesome5.NetCore30/XmlNamespace.cs rename to src/FontAwesome5.Net/XmlNamespace.cs diff --git a/src/FontAwesome5.Net40.sln b/src/FontAwesome5.Net40.sln deleted file mode 100644 index ce0a6e7..0000000 --- a/src/FontAwesome5.Net40.sln +++ /dev/null @@ -1,93 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29102.190 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B1387CB2-E6D3-4266-B1E7-065826845F0E}" - ProjectSection(SolutionItems) = preProject - ..\README.md = ..\README.md - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FontAwesome5", "FontAwesome5\FontAwesome5.csproj", "{C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{C2DF6A3D-4A1A-43C4-9474-7591294B72E9}" - ProjectSection(SolutionItems) = preProject - NuGet\FontAwesome5.nuspec = NuGet\FontAwesome5.nuspec - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{5DB18EB6-0943-4E8A-A9D7-C7146AD79C00}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FontAwesome5.Generator", "Tools\FontAwesome5.Generator\FontAwesome5.Generator.csproj", "{36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FontAwesome5.Net40", "FontAwesome5.Net40\FontAwesome5.Net40.csproj", "{064DF8AB-301D-4A3D-883F-2243DAA66605}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|ARM = Debug|ARM - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|ARM = Release|ARM - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Debug|ARM.ActiveCfg = Debug|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Debug|ARM.Build.0 = Debug|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Debug|x64.ActiveCfg = Debug|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Debug|x64.Build.0 = Debug|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Debug|x86.ActiveCfg = Debug|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Debug|x86.Build.0 = Debug|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Release|Any CPU.Build.0 = Release|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Release|ARM.ActiveCfg = Release|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Release|ARM.Build.0 = Release|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Release|x64.ActiveCfg = Release|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Release|x64.Build.0 = Release|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Release|x86.ActiveCfg = Release|Any CPU - {C5B304E1-FA5C-4A51-A2F2-816EB2D2A888}.Release|x86.Build.0 = Release|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Debug|ARM.ActiveCfg = Debug|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Debug|ARM.Build.0 = Debug|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Debug|x64.ActiveCfg = Debug|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Debug|x64.Build.0 = Debug|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Debug|x86.ActiveCfg = Debug|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Debug|x86.Build.0 = Debug|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Release|ARM.ActiveCfg = Release|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Release|ARM.Build.0 = Release|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Release|x64.ActiveCfg = Release|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Release|x64.Build.0 = Release|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Release|x86.ActiveCfg = Release|Any CPU - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B}.Release|x86.Build.0 = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|Any CPU.Build.0 = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|ARM.ActiveCfg = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|ARM.Build.0 = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|x64.ActiveCfg = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|x64.Build.0 = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|x86.ActiveCfg = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|x86.Build.0 = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|Any CPU.ActiveCfg = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|Any CPU.Build.0 = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|ARM.ActiveCfg = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|ARM.Build.0 = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|x64.ActiveCfg = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|x64.Build.0 = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|x86.ActiveCfg = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {36BAF672-62DD-46A9-B6E6-1F3B0AA0D84B} = {5DB18EB6-0943-4E8A-A9D7-C7146AD79C00} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {CCE0C24A-AD07-48ED-8A93-2B927239ED7E} - EndGlobalSection -EndGlobal diff --git a/src/FontAwesome5.Net40/Converters/ImageSourceConverter.cs b/src/FontAwesome5.Net40/Converters/ImageSourceConverter.cs deleted file mode 100644 index 1cc8984..0000000 --- a/src/FontAwesome5.Net40/Converters/ImageSourceConverter.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Windows.Data; -using System.Windows.Markup; -using System.Windows.Media; - -namespace FontAwesome5.Converters -{ - /// - /// Converts a FontAwesomIcon to an ImageSource. Use the ConverterParameter to pass the Brush. - /// - public class ImageSourceConverter : MarkupExtension, IValueConverter - { - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (!(value is EFontAwesomeIcon)) return null; - - var brush = parameter as Brush; - - if (brush == null) - brush = Brushes.Black; - - return ImageAwesome.CreateImageSource((EFontAwesomeIcon)value, brush); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} diff --git a/src/FontAwesome5.Net40/Extensions/ControlExtensions.cs b/src/FontAwesome5.Net40/Extensions/ControlExtensions.cs deleted file mode 100644 index cc28d8a..0000000 --- a/src/FontAwesome5.Net40/Extensions/ControlExtensions.cs +++ /dev/null @@ -1,134 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Media.Animation; - -namespace FontAwesome5.Extensions -{ - /// - /// Control extensions - /// - public static class ControlExtensions - { - /// - /// The key used for storing the spinner Storyboard. - /// - private static readonly string SpinnerStoryBoardName = String.Format("{0}Spinner", typeof(FontAwesome).Name); - - /// - /// Start the spinning animation - /// - /// FrameworkElement and ISpinable - /// Control to apply the rotation - public static void BeginSpin(this T control) - where T : FrameworkElement, ISpinable - { - var transformGroup = control.RenderTransform as TransformGroup ?? new TransformGroup(); - - var rotateTransform = transformGroup.Children.OfType().FirstOrDefault(); - - if (rotateTransform != null) - { - rotateTransform.Angle = 0; - } - else - { - transformGroup.Children.Add(new RotateTransform(0.0)); - control.RenderTransform = transformGroup; - control.RenderTransformOrigin = new Point(0.5, 0.5); - } - - var storyboard = new Storyboard(); - - var animation = new DoubleAnimation - { - From = 0, - To = 360, - AutoReverse = false, - RepeatBehavior = RepeatBehavior.Forever, - Duration = new Duration(TimeSpan.FromSeconds(control.SpinDuration)) - }; - storyboard.Children.Add(animation); - - Storyboard.SetTarget(animation, control); - Storyboard.SetTargetProperty(animation, - new PropertyPath("(0).(1)[0].(2)", UIElement.RenderTransformProperty, - TransformGroup.ChildrenProperty, RotateTransform.AngleProperty)); - - storyboard.Begin(); - control.Resources.Add(SpinnerStoryBoardName, storyboard); - } - - /// - /// Stop the spinning animation - /// - /// FrameworkElement and ISpinable - /// Control to stop the rotation. - public static void StopSpin(this T control) - where T : FrameworkElement, ISpinable - { - var storyboard = control.Resources[SpinnerStoryBoardName] as Storyboard; - - if (storyboard == null) return; - - storyboard.Stop(); - - control.Resources.Remove(SpinnerStoryBoardName); - } - - /// - /// Sets the rotation for the control - /// - /// FrameworkElement and IRotatable - /// Control to apply the rotation - public static void SetRotation(this T control) - where T : FrameworkElement, IRotatable - { - var transformGroup = control.RenderTransform as TransformGroup ?? new TransformGroup(); - - var rotateTransform = transformGroup.Children.OfType().FirstOrDefault(); - - if (rotateTransform != null) - { - rotateTransform.Angle = control.Rotation; - } - else - { - transformGroup.Children.Add(new RotateTransform(control.Rotation)); - control.RenderTransform = transformGroup; - control.RenderTransformOrigin = new Point(0.5, 0.5); - } - } - - /// - /// Sets the flip orientation for the control - /// - /// FrameworkElement and IRotatable - /// Control to apply the rotation - public static void SetFlipOrientation(this T control) - where T : FrameworkElement, IFlippable - { - var transformGroup = control.RenderTransform as TransformGroup ?? new TransformGroup(); - - var scaleX = control.FlipOrientation == EFlipOrientation.Normal || control.FlipOrientation == EFlipOrientation.Vertical ? 1 : -1; - var scaleY = control.FlipOrientation == EFlipOrientation.Normal || control.FlipOrientation == EFlipOrientation.Horizontal ? 1 : -1; - - var scaleTransform = transformGroup.Children.OfType().FirstOrDefault(); - - if (scaleTransform != null) - { - scaleTransform.ScaleX = scaleX; - scaleTransform.ScaleY = scaleY; - } - else - { - transformGroup.Children.Add(new ScaleTransform(scaleX, scaleY)); - control.RenderTransform = transformGroup; - control.RenderTransformOrigin = new Point(0.5, 0.5); - } - } - } -} diff --git a/src/FontAwesome5.Net40/FontAwesome5.Net40.csproj b/src/FontAwesome5.Net40/FontAwesome5.Net40.csproj deleted file mode 100644 index 00fa8ac..0000000 --- a/src/FontAwesome5.Net40/FontAwesome5.Net40.csproj +++ /dev/null @@ -1,106 +0,0 @@ - - - - - Debug - AnyCPU - {064DF8AB-301D-4A3D-883F-2243DAA66605} - Library - Properties - FontAwesome5 - FontAwesome5.Net40 - v4.0 - 512 - - - True - False - False - False - False - - - False - SettingsVersion - - - - - true - full - false - bin\Debug\ - TRACE;NET40 - prompt - 4 - false - - - - - pdbonly - true - bin\Release\ - TRACE;NET40 - prompt - 4 - bin\Release\FontAwesome5.Net40.xml - false - - - true - - - Key.snk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Fonts\Font Awesome 5 Brands-Regular-400.otf - - - Fonts\Font Awesome 5 Free-Regular-400.otf - - - Fonts\Font Awesome 5 Free-Solid-900.otf - - - - - {c5b304e1-fa5c-4a51-a2f2-816eb2d2a888} - FontAwesome5 - - - - - - - \ No newline at end of file diff --git a/src/FontAwesome5.Net40/Fonts.cs b/src/FontAwesome5.Net40/Fonts.cs deleted file mode 100644 index 34c19a1..0000000 --- a/src/FontAwesome5.Net40/Fonts.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Media; - -namespace FontAwesome5 -{ - /// - /// Provides FontFamilies and Typefaces of FontAwesome5. - /// - public static class Fonts - { - /// - /// FontAwesome5 Regular FontFamily - /// - public static readonly FontFamily RegularFontFamily = new FontFamily(new Uri("pack://application:,,,/FontAwesome5.Net40;component/"), "./Fonts/#Font Awesome 5 Free Regular"); - /// - /// FontAwesome5 Solid FontFamily - /// - public static readonly FontFamily SolidFontFamily = new FontFamily(new Uri("pack://application:,,,/FontAwesome5.Net40;component/"), "./Fonts/#Font Awesome 5 Free Solid"); - /// - /// FontAwesome5 Brands FontFamily - /// - public static readonly FontFamily BrandsFontFamily = new FontFamily(new Uri("pack://application:,,,/FontAwesome5.Net40;component/"), "./Fonts/#Font Awesome 5 Brands Regular"); - - /// - /// FontAwesome5 Regular Typeface - /// - public static readonly Typeface RegularTypeface = new Typeface(RegularFontFamily, FontStyles.Normal, FontWeights.Normal, FontStretches.Normal); - /// - /// FontAwesome5 Solid Typeface - /// - public static readonly Typeface SolidTypeface = new Typeface(SolidFontFamily, FontStyles.Normal, FontWeights.Normal, FontStretches.Normal); - /// - /// FontAwesome5 Brands Typeface - /// - public static readonly Typeface BrandsTypeface = new Typeface(BrandsFontFamily, FontStyles.Normal, FontWeights.Normal, FontStretches.Normal); - } -} diff --git a/src/FontAwesome5.Net40/ImageAwesome.cs b/src/FontAwesome5.Net40/ImageAwesome.cs deleted file mode 100644 index 251f23b..0000000 --- a/src/FontAwesome5.Net40/ImageAwesome.cs +++ /dev/null @@ -1,212 +0,0 @@ -using FontAwesome5.Extensions; -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; - -namespace FontAwesome5 -{ - /// - /// Represents a control that draws an FontAwesome icon as an image. - /// - public class ImageAwesome - : Image, ISpinable, IRotatable, IFlippable - { - /// - /// Identifies the FontAwesome.WPF.ImageAwesome.Foreground dependency property. - /// - public static readonly DependencyProperty ForegroundProperty = - DependencyProperty.Register("Foreground", typeof(Brush), typeof(ImageAwesome), new PropertyMetadata(Brushes.Black, OnIconPropertyChanged)); - /// - /// Identifies the FontAwesome.WPF.ImageAwesome.Icon dependency property. - /// - public static readonly DependencyProperty IconProperty = - DependencyProperty.Register("Icon", typeof(EFontAwesomeIcon), typeof(ImageAwesome), new PropertyMetadata(EFontAwesomeIcon.None, OnIconPropertyChanged)); - /// - /// Identifies the FontAwesome.WPF.ImageAwesome.Spin dependency property. - /// - public static readonly DependencyProperty SpinProperty = - DependencyProperty.Register("Spin", typeof(bool), typeof(ImageAwesome), new PropertyMetadata(false, OnSpinPropertyChanged, SpinCoerceValue)); - /// - /// Identifies the FontAwesome.WPF.ImageAwesome.Spin dependency property. - /// - public static readonly DependencyProperty SpinDurationProperty = - DependencyProperty.Register("SpinDuration", typeof(double), typeof(ImageAwesome), new PropertyMetadata(1d, SpinDurationChanged, SpinDurationCoerceValue)); - /// - /// Identifies the FontAwesome.WPF.ImageAwesome.Rotation dependency property. - /// - public static readonly DependencyProperty RotationProperty = - DependencyProperty.Register("Rotation", typeof(double), typeof(ImageAwesome), new PropertyMetadata(0d, RotationChanged, RotationCoerceValue)); - /// - /// Identifies the FontAwesome.WPF.ImageAwesome.FlipOrientation dependency property. - /// - public static readonly DependencyProperty FlipOrientationProperty = - DependencyProperty.Register("FlipOrientation", typeof(EFlipOrientation), typeof(ImageAwesome), new PropertyMetadata(EFlipOrientation.Normal, FlipOrientationChanged)); - - static ImageAwesome() - { - OpacityProperty.OverrideMetadata(typeof(ImageAwesome), new UIPropertyMetadata(1.0, OpacityChanged)); - } - - public ImageAwesome() - { - IsVisibleChanged += (s, a) => CoerceValue(SpinProperty); - } - - private static void OpacityChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - d.CoerceValue(SpinProperty); - } - - /// - /// Gets or sets the foreground brush of the icon. Changing this property will cause the icon to be redrawn. - /// - public Brush Foreground - { - get { return (Brush)GetValue(ForegroundProperty); } - set { SetValue(ForegroundProperty, value); } - } - - /// - /// Gets or sets the FontAwesome icon. Changing this property will cause the icon to be redrawn. - /// - public EFontAwesomeIcon Icon - { - get { return (EFontAwesomeIcon)GetValue(IconProperty); } - set { SetValue(IconProperty, value); } - } - - /// - /// Gets or sets the current spin (angle) animation of the icon. - /// - public bool Spin - { - get { return (bool)GetValue(SpinProperty); } - set { SetValue(SpinProperty, value); } - } - - private static void OnSpinPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var imageAwesome = d as ImageAwesome; - - if (imageAwesome == null) return; - - if ((bool)e.NewValue) - imageAwesome.BeginSpin(); - else - { - imageAwesome.StopSpin(); - imageAwesome.SetRotation(); - } - } - - private static object SpinCoerceValue(DependencyObject d, object basevalue) - { - var imageAwesome = (ImageAwesome)d; - - if (!imageAwesome.IsVisible || imageAwesome.Opacity == 0.0 || imageAwesome.SpinDuration == 0.0) - return false; - - return basevalue; - } - - /// - /// Gets or sets the duration of the spinning animation (in seconds). This will stop and start the spin animation. - /// - public double SpinDuration - { - get { return (double)GetValue(SpinDurationProperty); } - set { SetValue(SpinDurationProperty, value); } - } - - private static void SpinDurationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var imageAwesome = d as ImageAwesome; - - if (null == imageAwesome || !imageAwesome.Spin || !(e.NewValue is double) || e.NewValue.Equals(e.OldValue)) return; - - imageAwesome.StopSpin(); - imageAwesome.BeginSpin(); - } - - private static object SpinDurationCoerceValue(DependencyObject d, object value) - { - double val = (double)value; - return val < 0 ? 0d : value; - } - - /// - /// Gets or sets the current rotation (angle). - /// - public double Rotation - { - get { return (double)GetValue(RotationProperty); } - set { SetValue(RotationProperty, value); } - } - - - private static void RotationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var imageAwesome = d as ImageAwesome; - - if (null == imageAwesome || imageAwesome.Spin || !(e.NewValue is double) || e.NewValue.Equals(e.OldValue)) return; - - imageAwesome.SetRotation(); - } - - private static object RotationCoerceValue(DependencyObject d, object value) - { - double val = (double)value; - return val < 0 ? 0d : (val > 360 ? 360d : value); - } - - /// - /// Gets or sets the current orientation (horizontal, vertical). - /// - public EFlipOrientation FlipOrientation - { - get { return (EFlipOrientation)GetValue(FlipOrientationProperty); } - set { SetValue(FlipOrientationProperty, value); } - } - - private static void FlipOrientationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var imageAwesome = d as ImageAwesome; - - if (null == imageAwesome || !(e.NewValue is EFlipOrientation) || e.NewValue.Equals(e.OldValue)) return; - - imageAwesome.SetFlipOrientation(); - } - - private static void OnIconPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var imageAwesome = d as ImageAwesome; - - if (imageAwesome == null) return; - - imageAwesome.SetValue(SourceProperty, CreateImageSource(imageAwesome.Icon, imageAwesome.Foreground)); - } - - /// - /// Creates a new System.Windows.Media.ImageSource of a specified FontAwesomeIcon and foreground System.Windows.Media.Brush. - /// - /// The FontAwesome icon to be drawn. - /// The System.Windows.Media.Brush to be used as the foreground. - /// The font size in em. - /// A new System.Windows.Media.ImageSource - public static ImageSource CreateImageSource(EFontAwesomeIcon icon, Brush foregroundBrush, double emSize = 100) - { - var visual = new DrawingVisual(); - using (var drawingContext = visual.RenderOpen()) - { - drawingContext.DrawText( - new FormattedText(icon.GetUnicode(), CultureInfo.InvariantCulture, FlowDirection.LeftToRight, - icon.GetTypeFace(), emSize, foregroundBrush) - { TextAlignment = TextAlignment.Center }, new Point(0, 0)); - } - return new DrawingImage(visual.Drawing); - } - - } -} diff --git a/src/FontAwesome5.Net40/Properties/AssemblyInfo.cs b/src/FontAwesome5.Net40/Properties/AssemblyInfo.cs deleted file mode 100644 index 436f467..0000000 --- a/src/FontAwesome5.Net40/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows.Markup; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("FontAwesome5.Net40")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Codinion")] -[assembly: AssemblyProduct("FontAwesome5.Net40")] -[assembly: AssemblyCopyright("Copyright © Codinion 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("064df8ab-301d-4a3d-883f-2243daa66605")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] - -[assembly: XmlnsPrefix("http://schemas.fontawesome.com/icons/", "fa5")] -[assembly: XmlnsDefinition("http://schemas.fontawesome.com/icons/", "FontAwesome5")] -[assembly: XmlnsDefinition("http://schemas.fontawesome.com/icons/", "FontAwesome5.Converters")] diff --git a/src/FontAwesome5.Net40/SvgAwesome.cs b/src/FontAwesome5.Net40/SvgAwesome.cs deleted file mode 100644 index 72349c8..0000000 --- a/src/FontAwesome5.Net40/SvgAwesome.cs +++ /dev/null @@ -1,219 +0,0 @@ -using FontAwesome5.Extensions; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Shapes; - -namespace FontAwesome5 -{ - public class SvgAwesome : Viewbox, ISpinable, IRotatable, IFlippable - { - /// - /// Identifies the FontAwesome.WPF.SvgAwesome.Foreground dependency property. - /// - public static readonly DependencyProperty ForegroundProperty = - DependencyProperty.Register("Foreground", typeof(Brush), typeof(SvgAwesome), new PropertyMetadata(Brushes.Black, OnIconPropertyChanged)); - /// - /// Identifies the FontAwesome.WPF.SvgAwesome.Icon dependency property. - /// - public static readonly DependencyProperty IconProperty = - DependencyProperty.Register("Icon", typeof(EFontAwesomeIcon), typeof(SvgAwesome), new PropertyMetadata(EFontAwesomeIcon.None, OnIconPropertyChanged)); - /// - /// Identifies the FontAwesome.WPF.SvgAwesome.Spin dependency property. - /// - public static readonly DependencyProperty SpinProperty = - DependencyProperty.Register("Spin", typeof(bool), typeof(SvgAwesome), new PropertyMetadata(false, OnSpinPropertyChanged, SpinCoerceValue)); - /// - /// Identifies the FontAwesome.WPF.SvgAwesome.Spin dependency property. - /// - public static readonly DependencyProperty SpinDurationProperty = - DependencyProperty.Register("SpinDuration", typeof(double), typeof(SvgAwesome), new PropertyMetadata(1d, SpinDurationChanged, SpinDurationCoerceValue)); - /// - /// Identifies the FontAwesome.WPF.SvgAwesome.Rotation dependency property. - /// - public static readonly DependencyProperty RotationProperty = - DependencyProperty.Register("Rotation", typeof(double), typeof(SvgAwesome), new PropertyMetadata(0d, RotationChanged, RotationCoerceValue)); - /// - /// Identifies the FontAwesome.WPF.SvgAwesome.FlipOrientation dependency property. - /// - public static readonly DependencyProperty FlipOrientationProperty = - DependencyProperty.Register("FlipOrientation", typeof(EFlipOrientation), typeof(SvgAwesome), new PropertyMetadata(EFlipOrientation.Normal, FlipOrientationChanged)); - - static SvgAwesome() - { - OpacityProperty.OverrideMetadata(typeof(SvgAwesome), new UIPropertyMetadata(1.0, OpacityChanged)); - } - - public SvgAwesome() - { - IsVisibleChanged += (s, a) => CoerceValue(SpinProperty); - } - - private static void OpacityChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - d.CoerceValue(SpinProperty); - } - - /// - /// Gets or sets the foreground brush of the icon. Changing this property will cause the icon to be redrawn. - /// - public Brush Foreground - { - get { return (Brush)GetValue(ForegroundProperty); } - set { SetValue(ForegroundProperty, value); } - } - - /// - /// Gets or sets the FontAwesome icon. Changing this property will cause the icon to be redrawn. - /// - public EFontAwesomeIcon Icon - { - get { return (EFontAwesomeIcon)GetValue(IconProperty); } - set { SetValue(IconProperty, value); } - } - - /// - /// Gets or sets the current spin (angle) animation of the icon. - /// - public bool Spin - { - get { return (bool)GetValue(SpinProperty); } - set { SetValue(SpinProperty, value); } - } - - private static void OnSpinPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var svgAwesome = d as SvgAwesome; - - if (svgAwesome == null) return; - - if ((bool)e.NewValue) - svgAwesome.BeginSpin(); - else - { - svgAwesome.StopSpin(); - svgAwesome.SetRotation(); - } - } - - private static object SpinCoerceValue(DependencyObject d, object basevalue) - { - var svgAwesome = (SvgAwesome)d; - - if (!svgAwesome.IsVisible || svgAwesome.Opacity == 0.0 || svgAwesome.SpinDuration == 0.0) - return false; - - return basevalue; - } - - /// - /// Gets or sets the duration of the spinning animation (in seconds). This will stop and start the spin animation. - /// - public double SpinDuration - { - get { return (double)GetValue(SpinDurationProperty); } - set { SetValue(SpinDurationProperty, value); } - } - - private static void SpinDurationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var svgAwesome = d as SvgAwesome; - - if (null == svgAwesome || !svgAwesome.Spin || !(e.NewValue is double) || e.NewValue.Equals(e.OldValue)) return; - - svgAwesome.StopSpin(); - svgAwesome.BeginSpin(); - } - - private static object SpinDurationCoerceValue(DependencyObject d, object value) - { - double val = (double)value; - return val < 0 ? 0d : value; - } - - /// - /// Gets or sets the current rotation (angle). - /// - public double Rotation - { - get { return (double)GetValue(RotationProperty); } - set { SetValue(RotationProperty, value); } - } - - - private static void RotationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var svgAwesome = d as SvgAwesome; - - if (null == svgAwesome || svgAwesome.Spin || !(e.NewValue is double) || e.NewValue.Equals(e.OldValue)) return; - - svgAwesome.SetRotation(); - } - - private static object RotationCoerceValue(DependencyObject d, object value) - { - double val = (double)value; - return val < 0 ? 0d : (val > 360 ? 360d : value); - } - - /// - /// Gets or sets the current orientation (horizontal, vertical). - /// - public EFlipOrientation FlipOrientation - { - get { return (EFlipOrientation)GetValue(FlipOrientationProperty); } - set { SetValue(FlipOrientationProperty, value); } - } - - private static void FlipOrientationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var svgAwesome = d as SvgAwesome; - - if (null == svgAwesome || !(e.NewValue is EFlipOrientation) || e.NewValue.Equals(e.OldValue)) return; - - svgAwesome.SetFlipOrientation(); - } - - private static void OnIconPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var svgAwesome = d as SvgAwesome; - - if (svgAwesome == null) return; - - if (svgAwesome.Icon == EFontAwesomeIcon.None) - { - svgAwesome.Child = null; - } - else - { - svgAwesome.Child = CreatePath(svgAwesome.Icon, svgAwesome.Foreground); - } - } - - /// - /// Creates a new System.Windows.Media.ImageSource of a specified FontAwesomeIcon and foreground System.Windows.Media.Brush. - /// - /// The FontAwesome icon to be drawn. - /// The System.Windows.Media.Brush to be used as the foreground. - /// The font size in em. - /// A new System.Windows.Media.ImageSource - public static Path CreatePath(EFontAwesomeIcon icon, Brush foregroundBrush, double emSize = 100) - { - Path path = null; - if (icon.GetSvg(out var strPath, out var width, out var height)) - { - path = new Path(); - path.Data = Geometry.Parse(strPath); - path.Width = width; - path.Height = height; - path.Fill = foregroundBrush; - } - return path; - } - } -} diff --git a/src/FontAwesome5.NetCore30/Awesome.cs b/src/FontAwesome5.NetCore30/Awesome.cs deleted file mode 100644 index c9e062a..0000000 --- a/src/FontAwesome5.NetCore30/Awesome.cs +++ /dev/null @@ -1,61 +0,0 @@ -using FontAwesome5.Extensions; -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; - -namespace FontAwesome5 -{ - /// - /// Provides attached properties to set FontAwesome icons on controls. - /// - public static class Awesome - { - /// - /// Identifies the FontAwesome.WPF.Awesome.Content attached dependency property. - /// - public static readonly DependencyProperty ContentProperty = - DependencyProperty.RegisterAttached( - "Content", - typeof(EFontAwesomeIcon), - typeof(Awesome), - new PropertyMetadata(DEFAULT_CONTENT, ContentChanged)); - - /// - /// Gets the content of a ContentControl, expressed as a FontAwesome icon. - /// - /// The ContentControl subject of the query - /// FontAwesome icon found as content - public static EFontAwesomeIcon GetContent(DependencyObject target) - { - return (EFontAwesomeIcon)target.GetValue(ContentProperty); - } - /// - /// Sets the content of a ContentControl expressed as a FontAwesome icon. This will cause the content to be redrawn. - /// - /// The ContentControl where to set the content - /// FontAwesome icon to set as content - public static void SetContent(DependencyObject target, EFontAwesomeIcon value) - { - target.SetValue(ContentProperty, value); - } - - private static void ContentChanged(DependencyObject sender, DependencyPropertyChangedEventArgs evt) - { - // If target is not a ContenControl just ignore: Awesome.Content property can only be set on a ContentControl element - if (!(sender is ContentControl)) return; - - ContentControl target = (ContentControl)sender; - - // If value is not a FontAwesomeIcon just ignore: Awesome.Content property can only be set to a FontAwesomeIcon value - if (!(evt.NewValue is EFontAwesomeIcon)) return; - - EFontAwesomeIcon symbolIcon = (EFontAwesomeIcon)evt.NewValue; - - target.FontFamily = symbolIcon.GetFontFamily(); - target.Content = symbolIcon.GetUnicode(); - } - - private const EFontAwesomeIcon DEFAULT_CONTENT = EFontAwesomeIcon.None; - } -} diff --git a/src/FontAwesome5.NetCore30/Converters/LabelConverter.cs b/src/FontAwesome5.NetCore30/Converters/LabelConverter.cs deleted file mode 100644 index e38e11e..0000000 --- a/src/FontAwesome5.NetCore30/Converters/LabelConverter.cs +++ /dev/null @@ -1,39 +0,0 @@ -using FontAwesome5.Extensions; -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace FontAwesome5.Converters -{ - public class LabelConverter : MarkupExtension, IValueConverter - { - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (!(value is EFontAwesomeIcon)) - return null; - - var icon = (EFontAwesomeIcon)value; - var info = icon.GetInformationAttribute(); - if (info == null) - return null; - - if (parameter is string format && !string.IsNullOrEmpty(format)) - { - return string.Format(format, info.Label, info.Style); - } - - return info.Label; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} diff --git a/src/FontAwesome5.NetCore30/Converters/StyleConverter.cs b/src/FontAwesome5.NetCore30/Converters/StyleConverter.cs deleted file mode 100644 index 6f9b7e7..0000000 --- a/src/FontAwesome5.NetCore30/Converters/StyleConverter.cs +++ /dev/null @@ -1,34 +0,0 @@ -using FontAwesome5.Extensions; -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace FontAwesome5.Converters -{ - public class StyleConverter : MarkupExtension, IValueConverter - { - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (!(value is EFontAwesomeIcon)) - return EFontAwesomeStyle.None; - - var icon = (EFontAwesomeIcon)value; - var info = icon.GetInformationAttribute(); - if (info == null) - return EFontAwesomeStyle.None; - - return info.Style; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} diff --git a/src/FontAwesome5.NetCore30/Extensions/EFontAwesomeIconExtensions.cs b/src/FontAwesome5.NetCore30/Extensions/EFontAwesomeIconExtensions.cs deleted file mode 100644 index 5d630af..0000000 --- a/src/FontAwesome5.NetCore30/Extensions/EFontAwesomeIconExtensions.cs +++ /dev/null @@ -1,49 +0,0 @@ -using FontAwesome5.Extensions; -using System.Windows.Media; - -namespace FontAwesome5.Extensions -{ - /// - /// EFontAwesomeIcon extensions - /// - public static class EFontAwesomeIconExtensions - { - /// - /// Get the Typeface of an icon - /// - public static Typeface GetTypeFace(this EFontAwesomeIcon icon) - { - var info = icon.GetInformationAttribute(); - if (info == null) - return Fonts.RegularTypeface; - - return info.Style switch - { - EFontAwesomeStyle.Regular => Fonts.RegularTypeface, - EFontAwesomeStyle.Solid => Fonts.SolidTypeface, - EFontAwesomeStyle.Brands => Fonts.BrandsTypeface, - - _ => null, - }; - } - - /// - /// Get the FontFamily of an icon - /// - public static FontFamily GetFontFamily(this EFontAwesomeIcon icon) - { - var info = icon.GetInformationAttribute(); - if (info == null) - return Fonts.RegularFontFamily; - - return info.Style switch - { - EFontAwesomeStyle.Regular => Fonts.RegularFontFamily, - EFontAwesomeStyle.Solid => Fonts.SolidFontFamily, - EFontAwesomeStyle.Brands => Fonts.BrandsFontFamily, - - _ => null, - }; - } - } -} diff --git a/src/FontAwesome5.NetCore30/FontAwesome.cs b/src/FontAwesome5.NetCore30/FontAwesome.cs deleted file mode 100644 index 7b3afdb..0000000 --- a/src/FontAwesome5.NetCore30/FontAwesome.cs +++ /dev/null @@ -1,179 +0,0 @@ -using FontAwesome5.Extensions; -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; - -namespace FontAwesome5 -{ - /// - /// Provides a lightweight control for displaying a FontAwesome icon as text. - /// - public class FontAwesome : TextBlock, ISpinable, IRotatable, IFlippable - { - /// - /// Identifies the FontAwesome.WPF.FontAwesome.Icon dependency property. - /// - public static readonly DependencyProperty IconProperty = - DependencyProperty.Register("Icon", typeof(EFontAwesomeIcon), typeof(FontAwesome), new PropertyMetadata(EFontAwesomeIcon.None, OnIconPropertyChanged)); - - /// - /// Identifies the FontAwesome.WPF.FontAwesome.Spin dependency property. - /// - public static readonly DependencyProperty SpinProperty = - DependencyProperty.Register("Spin", typeof(bool), typeof(FontAwesome), new PropertyMetadata(false, OnSpinPropertyChanged, SpinCoerceValue)); - - /// - /// Identifies the FontAwesome.WPF.FontAwesome.SpinDuration dependency property. - /// - public static readonly DependencyProperty SpinDurationProperty = - DependencyProperty.Register("SpinDuration", typeof(double), typeof(FontAwesome), new PropertyMetadata(1d, SpinDurationChanged, SpinDurationCoerceValue)); - - /// - /// Identifies the FontAwesome.WPF.FontAwesome.Rotation dependency property. - /// - public static readonly DependencyProperty RotationProperty = - DependencyProperty.Register("Rotation", typeof(double), typeof(FontAwesome), new PropertyMetadata(0d, RotationChanged, RotationCoerceValue)); - - /// - /// Identifies the FontAwesome.WPF.FontAwesome.FlipOrientation dependency property. - /// - public static readonly DependencyProperty FlipOrientationProperty = - DependencyProperty.Register("FlipOrientation", typeof(EFlipOrientation), typeof(FontAwesome), new PropertyMetadata(EFlipOrientation.Normal, FlipOrientationChanged)); - - static FontAwesome() - { - OpacityProperty.OverrideMetadata(typeof(FontAwesome), new UIPropertyMetadata(1.0, OpacityChanged)); - } - - public FontAwesome() - { - IsVisibleChanged += (s, a) => CoerceValue(SpinProperty); - } - - private static void OpacityChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - d.CoerceValue(SpinProperty); - } - - /// - /// Gets or sets the FontAwesome icon. Changing this property will cause the icon to be redrawn. - /// - public EFontAwesomeIcon Icon - { - get { return (EFontAwesomeIcon)GetValue(IconProperty); } - set { SetValue(IconProperty, value); } - } - - /// - /// Gets or sets the current spin (angle) animation of the icon. - /// - public bool Spin - { - get { return (bool)GetValue(SpinProperty); } - set { SetValue(SpinProperty, value); } - } - - private static void OnIconPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { -#if NET40 - d.SetValue(TextOptions.TextRenderingModeProperty, TextRenderingMode.ClearType); -#endif - d.SetValue(FontFamilyProperty, ((EFontAwesomeIcon)e.NewValue).GetFontFamily()); - d.SetValue(TextAlignmentProperty, TextAlignment.Center); - d.SetValue(TextProperty, ((EFontAwesomeIcon)e.NewValue).GetUnicode()); - } - - private static void OnSpinPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var fontAwesome = d as FontAwesome; - - if (fontAwesome == null) return; - - if ((bool)e.NewValue) - fontAwesome.BeginSpin(); - else - { - fontAwesome.StopSpin(); - fontAwesome.SetRotation(); - } - } - - private static object SpinCoerceValue(DependencyObject d, object basevalue) - { - var fontAwesome = (FontAwesome)d; - - if (!fontAwesome.IsVisible || fontAwesome.Opacity == 0.0 || fontAwesome.SpinDuration == 0.0) - return false; - - return basevalue; - } - - /// - /// Gets or sets the duration of the spinning animation (in seconds). This will stop and start the spin animation. - /// - public double SpinDuration - { - get { return (double)GetValue(SpinDurationProperty); } - set { SetValue(SpinDurationProperty, value); } - } - - private static void SpinDurationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var fontAwesome = d as FontAwesome; - - if (null == fontAwesome || !fontAwesome.Spin || !(e.NewValue is double) || e.NewValue.Equals(e.OldValue)) return; - - fontAwesome.StopSpin(); - fontAwesome.BeginSpin(); - } - - private static object SpinDurationCoerceValue(DependencyObject d, object value) - { - double val = (double)value; - return val < 0 ? 0d : value; - } - - /// - /// Gets or sets the current rotation (angle). - /// - public double Rotation - { - get { return (double)GetValue(RotationProperty); } - set { SetValue(RotationProperty, value); } - } - - private static void RotationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var fontAwesome = d as FontAwesome; - - if (null == fontAwesome || fontAwesome.Spin || !(e.NewValue is double) || e.NewValue.Equals(e.OldValue)) return; - - fontAwesome.SetRotation(); - } - - private static object RotationCoerceValue(DependencyObject d, object value) - { - double val = (double)value; - return val < 0 ? 0d : (val > 360 ? 360d : value); - } - - /// - /// Gets or sets the current orientation (horizontal, vertical). - /// - public EFlipOrientation FlipOrientation - { - get { return (EFlipOrientation)GetValue(FlipOrientationProperty); } - set { SetValue(FlipOrientationProperty, value); } - } - - private static void FlipOrientationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - var fontAwesome = d as FontAwesome; - - if (null == fontAwesome || !(e.NewValue is EFlipOrientation) || e.NewValue.Equals(e.OldValue)) return; - - fontAwesome.SetFlipOrientation(); - } - } -} diff --git a/src/FontAwesome5.NetCore30/IFlippable.cs b/src/FontAwesome5.NetCore30/IFlippable.cs deleted file mode 100644 index 0aee27f..0000000 --- a/src/FontAwesome5.NetCore30/IFlippable.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; - -namespace FontAwesome5 -{ - /// - /// Defines the different flip orientations that a icon can have. - /// - [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] - public enum EFlipOrientation - { - /// - /// Default - /// - Normal = 0, - /// - /// Flip horizontally (on x-achsis) - /// - Horizontal, - /// - /// Flip vertically (on y-achsis) - /// - Vertical, - } - - /// - /// Represents a flippable control - /// - public interface IFlippable - { - /// - /// Gets or sets the current orientation (horizontal, vertical). - /// - EFlipOrientation FlipOrientation { get; set; } - } -} diff --git a/src/FontAwesome5.NetCore30/IRotatable.cs b/src/FontAwesome5.NetCore30/IRotatable.cs deleted file mode 100644 index 594154a..0000000 --- a/src/FontAwesome5.NetCore30/IRotatable.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FontAwesome5 -{ - /// - /// Represents a rotatable control - /// - public interface IRotatable - { - /// - /// Gets or sets the current rotation (angle). - /// - double Rotation { get; set; } - } -} diff --git a/src/FontAwesome5.NetCore30/ISpinable.cs b/src/FontAwesome5.NetCore30/ISpinable.cs deleted file mode 100644 index 3e7aba3..0000000 --- a/src/FontAwesome5.NetCore30/ISpinable.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FontAwesome5 -{ - /// - /// Represents a spinable control - /// - public interface ISpinable - { - /// - /// Gets or sets the current spin (angle) animation of the icon. - /// - bool Spin { get; set; } - - /// - /// Gets or sets the duration of the spinning animation (in seconds). This will stop and start the spin animation. - /// - double SpinDuration { get; set; } - } -} diff --git a/src/FontAwesome5.NetCore30/Key.snk b/src/FontAwesome5.NetCore30/Key.snk deleted file mode 100644 index 11a865fe6e93d977acafbf666c2bfb7663d8cf78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50096UienA*s;Vuq;_760DS)+@b~Fxj^tLhZ zcmb4d(rN`_(-!L=`UFu1nE0=R6YFB1BTYl`UMPlZyHl<(^bXrIJ_F${Ndx-si!Y3r z_jJ=15V~E!E1ZTd%Lj)inU~u4mfNjtyss*tIok^M0&Lg#MFG*b+*@=Y`;0bW`fkAw zLbZ9KpXoPv*~3E58~7FU!^cIw!2I1gq(zVmCJD;q?ALVzxL24GAV!4h%hnZAnEn?9 z`RAi=#WRb&G3m(@Eq$qNG$JU_%&iNb`RlF?u+ElpxPAM8l3aey)LFDlHh8}X<1eOx zas+&rcrWKx()M-X;Ri^^`&iA;0o_i35r)_=bDQ zsyllzf7kE)#}aJHZ=IbLZTrQ{LXUC_yn)AI1NRz?TIMOkckBc*k=0a4ZOr7nE;Wb; zbVwG^j(kbB=6CGmiyz8C&0nO0ri@u;B%RYclVU~B9O9IzK_=PBRl!Mi()`F zNr&GvC|jT1YOg92m^a-0$e9S3la;F?thA7I7JO()1B1nL>?6O$Nx^|>Jnk1~&4mD} zr6KNn7~{BTk)obD+-!s<8_KG$tSKV^ diff --git a/src/FontAwesome5.UWP/Extensions/ControlExtensions.cs b/src/FontAwesome5.UWP/Extensions/ControlExtensions.cs deleted file mode 100644 index f5376d2..0000000 --- a/src/FontAwesome5.UWP/Extensions/ControlExtensions.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Windows.Foundation; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Media.Animation; - -namespace FontAwesome5.Extensions -{ - public static class ControlExtensions - { - /// - /// The key used for storing the spinner Storyboard. - /// - private static readonly string SpinnerStoryBoardName = String.Format("{0}Spinner", typeof(FontAwesome).Name); - - /// - /// Start the spinning animation - /// - /// FrameworkElement and ISpinable - /// Control to apply the rotation - public static void BeginSpin(this T control) - where T : FrameworkElement, ISpinable - { - var transformGroup = control.RenderTransform as TransformGroup ?? new TransformGroup(); - - var rotateTransform = transformGroup.Children.OfType().FirstOrDefault(); - - if (rotateTransform != null) - { - rotateTransform.Angle = 0; - } - else - { - transformGroup.Children.Add(new RotateTransform() - { - Angle = 0 - }); - control.RenderTransform = transformGroup; - control.RenderTransformOrigin = new Point(0.5, 0.5); - } - - var storyboard = new Storyboard(); - - var animation = new DoubleAnimation - { - From = 0, - To = 360, - AutoReverse = false, - RepeatBehavior = RepeatBehavior.Forever, - Duration = new Duration(TimeSpan.FromSeconds(control.SpinDuration)) - }; - storyboard.Children.Add(animation); - - Storyboard.SetTarget(animation, control); - Storyboard.SetTargetProperty(animation, "(FrameworkElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)"); - - storyboard.Begin(); - control.Resources.Add(SpinnerStoryBoardName, storyboard); - } - - /// - /// Stop the spinning animation - /// - /// FrameworkElement and ISpinable - /// Control to stop the rotation. - public static void StopSpin(this T control) - where T : FrameworkElement, ISpinable - { - var storyboard = control.Resources[SpinnerStoryBoardName] as Storyboard; - - if (storyboard == null) return; - - storyboard.Stop(); - - control.Resources.Remove(SpinnerStoryBoardName); - } - - /// - /// Sets the rotation for the control - /// - /// FrameworkElement and IRotatable - /// Control to apply the rotation - public static void SetRotation(this T control) - where T : FrameworkElement, IRotatable - { - var transformGroup = control.RenderTransform as TransformGroup ?? new TransformGroup(); - - var rotateTransform = transformGroup.Children.OfType().FirstOrDefault(); - - if (rotateTransform != null) - { - rotateTransform.Angle = control.Rotation; - } - else - { - transformGroup.Children.Add(new RotateTransform() - { - Angle = control.Rotation - }); - control.RenderTransform = transformGroup; - control.RenderTransformOrigin = new Point(0.5, 0.5); - } - } - - /// - /// Sets the flip orientation for the control - /// - /// FrameworkElement and IRotatable - /// Control to apply the rotation - public static void SetFlipOrientation(this T control) - where T : FrameworkElement, IFlippable - { - var transformGroup = control.RenderTransform as TransformGroup ?? new TransformGroup(); - - var scaleX = control.FlipOrientation == EFlipOrientation.Normal || control.FlipOrientation == EFlipOrientation.Vertical ? 1 : -1; - var scaleY = control.FlipOrientation == EFlipOrientation.Normal || control.FlipOrientation == EFlipOrientation.Horizontal ? 1 : -1; - - var scaleTransform = transformGroup.Children.OfType().FirstOrDefault(); - - if (scaleTransform != null) - { - scaleTransform.ScaleX = scaleX; - scaleTransform.ScaleY = scaleY; - } - else - { - transformGroup.Children.Add(new ScaleTransform() - { - ScaleX = scaleX, - ScaleY = scaleY - }); - control.RenderTransform = transformGroup; - control.RenderTransformOrigin = new Point(0.5, 0.5); - } - } - } - -} diff --git a/src/FontAwesome5.UWP/Extensions/EFontAwesomeIconExtensions.cs b/src/FontAwesome5.UWP/Extensions/EFontAwesomeIconExtensions.cs deleted file mode 100644 index cab9e0b..0000000 --- a/src/FontAwesome5.UWP/Extensions/EFontAwesomeIconExtensions.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Windows.UI.Xaml.Media; -using FontAwesome5.Extensions; - -namespace FontAwesome5.Extensions -{ - /// - /// EFontAwesomeIcon extensions - /// - public static class EFontAwesomeIconExtensions - { - /// - /// Get the FontFamily of an icon - /// - public static FontFamily GetFontFamily(this EFontAwesomeIcon icon) - { - var info = icon.GetInformationAttribute(); - if (info == null) - return FontFamily.XamlAutoFontFamily; - - switch (info.Style) - { - case EFontAwesomeStyle.Regular: return Fonts.RegularFontFamily; - case EFontAwesomeStyle.Solid: return Fonts.SolidFontFamily; - case EFontAwesomeStyle.Brands: return Fonts.BrandsFontFamily; - } - - return null; - } - } -} diff --git a/src/FontAwesome5.UWP/FontAwesome5.UWP.csproj b/src/FontAwesome5.UWP/FontAwesome5.UWP.csproj index cef2e7e..9998bdc 100644 --- a/src/FontAwesome5.UWP/FontAwesome5.UWP.csproj +++ b/src/FontAwesome5.UWP/FontAwesome5.UWP.csproj @@ -122,13 +122,8 @@ PackageReference - - - - - @@ -165,6 +160,7 @@ + 14.0 diff --git a/src/FontAwesome5.UWP/IFlippable.cs b/src/FontAwesome5.UWP/IFlippable.cs deleted file mode 100644 index ad61bf6..0000000 --- a/src/FontAwesome5.UWP/IFlippable.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; - -namespace FontAwesome5 -{ - /// - /// Defines the different flip orientations that a icon can have. - /// - public enum EFlipOrientation - { - /// - /// Default - /// - Normal = 0, - /// - /// Flip horizontally (on x-achsis) - /// - Horizontal, - /// - /// Flip vertically (on y-achsis) - /// - Vertical, - } - - /// - /// Represents a flippable control - /// - public interface IFlippable - { - /// - /// Gets or sets the current orientation (horizontal, vertical). - /// - EFlipOrientation FlipOrientation { get; set; } - } -} diff --git a/src/FontAwesome5.UWP/IRotatable.cs b/src/FontAwesome5.UWP/IRotatable.cs deleted file mode 100644 index 594154a..0000000 --- a/src/FontAwesome5.UWP/IRotatable.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FontAwesome5 -{ - /// - /// Represents a rotatable control - /// - public interface IRotatable - { - /// - /// Gets or sets the current rotation (angle). - /// - double Rotation { get; set; } - } -} diff --git a/src/FontAwesome5.UWP/ISpinable.cs b/src/FontAwesome5.UWP/ISpinable.cs deleted file mode 100644 index 3e7aba3..0000000 --- a/src/FontAwesome5.UWP/ISpinable.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FontAwesome5 -{ - /// - /// Represents a spinable control - /// - public interface ISpinable - { - /// - /// Gets or sets the current spin (angle) animation of the icon. - /// - bool Spin { get; set; } - - /// - /// Gets or sets the duration of the spinning animation (in seconds). This will stop and start the spin animation. - /// - double SpinDuration { get; set; } - } -} diff --git a/src/FontAwesome5.sln b/src/FontAwesome5.sln index cfb23d1..4d47505 100644 --- a/src/FontAwesome5.sln +++ b/src/FontAwesome5.sln @@ -24,11 +24,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FontAwesome5.Generator", "T EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FontAwesome5.UWP", "FontAwesome5.UWP\FontAwesome5.UWP.csproj", "{3DA649D8-590A-4BBD-8181-F01BC81748B7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FontAwesome5.Net40", "FontAwesome5.Net40\FontAwesome5.Net40.csproj", "{064DF8AB-301D-4A3D-883F-2243DAA66605}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FontAwesome5.Net", "FontAwesome5.Net\FontAwesome5.Net.csproj", "{3CECBBCF-74FA-4090-8872-2AF06D8BDE15}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FontAwesome5.NetCore30", "FontAwesome5.NetCore30\FontAwesome5.NetCore30.csproj", "{28C6082A-53DA-4B5F-BB13-FBD458AC5239}" +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "FontAwesome.Shared", "FontAwesome.Shared\FontAwesome.Shared.shproj", "{2F36F2DF-F8B2-49CB-91E7-E5C88E3A96D5}" EndProject Global + GlobalSection(SharedMSBuildProjectFiles) = preSolution + FontAwesome.Shared\FontAwesome.Shared.projitems*{2f36f2df-f8b2-49cb-91e7-e5c88e3a96d5}*SharedItemsImports = 13 + FontAwesome.Shared\FontAwesome.Shared.projitems*{3cecbbcf-74fa-4090-8872-2af06d8bde15}*SharedItemsImports = 5 + FontAwesome.Shared\FontAwesome.Shared.projitems*{3da649d8-590a-4bbd-8181-f01bc81748b7}*SharedItemsImports = 4 + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|ARM = Debug|ARM @@ -99,46 +104,26 @@ Global {3DA649D8-590A-4BBD-8181-F01BC81748B7}.Release|x64.Build.0 = Release|x64 {3DA649D8-590A-4BBD-8181-F01BC81748B7}.Release|x86.ActiveCfg = Release|x86 {3DA649D8-590A-4BBD-8181-F01BC81748B7}.Release|x86.Build.0 = Release|x86 - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|Any CPU.Build.0 = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|ARM.ActiveCfg = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|ARM.Build.0 = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|ARM64.Build.0 = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|x64.ActiveCfg = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|x64.Build.0 = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|x86.ActiveCfg = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Debug|x86.Build.0 = Debug|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|Any CPU.ActiveCfg = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|Any CPU.Build.0 = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|ARM.ActiveCfg = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|ARM.Build.0 = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|ARM64.ActiveCfg = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|ARM64.Build.0 = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|x64.ActiveCfg = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|x64.Build.0 = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|x86.ActiveCfg = Release|Any CPU - {064DF8AB-301D-4A3D-883F-2243DAA66605}.Release|x86.Build.0 = Release|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Debug|Any CPU.Build.0 = Debug|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Debug|ARM.ActiveCfg = Debug|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Debug|ARM.Build.0 = Debug|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Debug|ARM64.Build.0 = Debug|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Debug|x64.ActiveCfg = Debug|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Debug|x64.Build.0 = Debug|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Debug|x86.ActiveCfg = Debug|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Debug|x86.Build.0 = Debug|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Release|Any CPU.ActiveCfg = Release|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Release|Any CPU.Build.0 = Release|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Release|ARM.ActiveCfg = Release|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Release|ARM.Build.0 = Release|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Release|ARM64.ActiveCfg = Release|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Release|ARM64.Build.0 = Release|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Release|x64.ActiveCfg = Release|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Release|x64.Build.0 = Release|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Release|x86.ActiveCfg = Release|Any CPU - {28C6082A-53DA-4B5F-BB13-FBD458AC5239}.Release|x86.Build.0 = Release|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Debug|ARM.ActiveCfg = Debug|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Debug|ARM.Build.0 = Debug|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Debug|ARM64.Build.0 = Debug|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Debug|x64.ActiveCfg = Debug|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Debug|x64.Build.0 = Debug|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Debug|x86.ActiveCfg = Debug|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Debug|x86.Build.0 = Debug|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Release|Any CPU.Build.0 = Release|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Release|ARM.ActiveCfg = Release|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Release|ARM.Build.0 = Release|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Release|ARM64.ActiveCfg = Release|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Release|ARM64.Build.0 = Release|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Release|x64.ActiveCfg = Release|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Release|x64.Build.0 = Release|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Release|x86.ActiveCfg = Release|Any CPU + {3CECBBCF-74FA-4090-8872-2AF06D8BDE15}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/FontAwesome5/FontAwesome5.csproj b/src/FontAwesome5/FontAwesome5.csproj index 33e8a15..00ff9d1 100644 --- a/src/FontAwesome5/FontAwesome5.csproj +++ b/src/FontAwesome5/FontAwesome5.csproj @@ -15,7 +15,7 @@ true - ../FontAwesome5.NET40/Key.snk + ../FontAwesome5.NET/Key.snk MIT Copyright © Codinion 2018 diff --git a/src/NuGet/FontAwesome5.nuspec b/src/NuGet/FontAwesome5.nuspec index 36a656a..f17e206 100644 --- a/src/NuGet/FontAwesome5.nuspec +++ b/src/NuGet/FontAwesome5.nuspec @@ -4,7 +4,7 @@ FontAwesome5 $version$ - WPF (.Net and .Net Core 3.0) and UWP controls for the iconic SVG, font, and CSS toolkit Font Awesome 5. + WPF (.Net and .Net Core) and UWP controls for the iconic SVG, font, and CSS toolkit Font Awesome 5. For examples https://github.com/MartinTopfstedt/FontAwesome5 Font-Awesome Version: 5.13.0 @@ -25,21 +25,44 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + +