diff --git a/src/AvaloniaApp/App.axaml b/src/AvaloniaApp/App.axaml
index 065f56a..7f316a7 100644
--- a/src/AvaloniaApp/App.axaml
+++ b/src/AvaloniaApp/App.axaml
@@ -29,6 +29,7 @@
-
+
+
\ No newline at end of file
diff --git a/src/AvaloniaApp/AvaloniaApp.csproj b/src/AvaloniaApp/AvaloniaApp.csproj
index 71d98d1..b988d25 100644
--- a/src/AvaloniaApp/AvaloniaApp.csproj
+++ b/src/AvaloniaApp/AvaloniaApp.csproj
@@ -19,7 +19,8 @@
-
+
+
\ No newline at end of file
diff --git a/src/AvaloniaApp/MainWindow.axaml b/src/AvaloniaApp/MainWindow.axaml
index c9a2918..e4cf672 100644
--- a/src/AvaloniaApp/MainWindow.axaml
+++ b/src/AvaloniaApp/MainWindow.axaml
@@ -23,21 +23,37 @@
+
+
+
-
-
+
-
-
+
+
-
+
+
+
+
+
+
+
diff --git a/src/AvaloniaIconPacks.TestApp.sln b/src/AvaloniaIconPacks.TestApp.sln
index a8696e9..d21152d 100644
--- a/src/AvaloniaIconPacks.TestApp.sln
+++ b/src/AvaloniaIconPacks.TestApp.sln
@@ -14,6 +14,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IconPacks.Avalonia.BoxIcons", "IconPacks.Avalonia.BoxIcons\IconPacks.Avalonia.BoxIcons.csproj", "{0159372E-46AA-4886-B346-4AA74B26D613}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IconPacks.Avalonia", "IconPacks.Avalonia\IconPacks.Avalonia.csproj", "{49ECE319-789D-4A0C-9CAF-D79CF6BFEB48}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -60,6 +62,18 @@ Global
{0159372E-46AA-4886-B346-4AA74B26D613}.Release|x64.Build.0 = Release|Any CPU
{0159372E-46AA-4886-B346-4AA74B26D613}.Release|x86.ActiveCfg = Release|Any CPU
{0159372E-46AA-4886-B346-4AA74B26D613}.Release|x86.Build.0 = Release|Any CPU
+ {49ECE319-789D-4A0C-9CAF-D79CF6BFEB48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {49ECE319-789D-4A0C-9CAF-D79CF6BFEB48}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {49ECE319-789D-4A0C-9CAF-D79CF6BFEB48}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {49ECE319-789D-4A0C-9CAF-D79CF6BFEB48}.Debug|x64.Build.0 = Debug|Any CPU
+ {49ECE319-789D-4A0C-9CAF-D79CF6BFEB48}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {49ECE319-789D-4A0C-9CAF-D79CF6BFEB48}.Debug|x86.Build.0 = Debug|Any CPU
+ {49ECE319-789D-4A0C-9CAF-D79CF6BFEB48}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {49ECE319-789D-4A0C-9CAF-D79CF6BFEB48}.Release|Any CPU.Build.0 = Release|Any CPU
+ {49ECE319-789D-4A0C-9CAF-D79CF6BFEB48}.Release|x64.ActiveCfg = Release|Any CPU
+ {49ECE319-789D-4A0C-9CAF-D79CF6BFEB48}.Release|x64.Build.0 = Release|Any CPU
+ {49ECE319-789D-4A0C-9CAF-D79CF6BFEB48}.Release|x86.ActiveCfg = Release|Any CPU
+ {49ECE319-789D-4A0C-9CAF-D79CF6BFEB48}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/IconPacks.Avalonia.BoxIcons/PackIconBoxIcons.cs b/src/IconPacks.Avalonia.BoxIcons/PackIconBoxIcons.cs
index 29404f7..cf08088 100644
--- a/src/IconPacks.Avalonia.BoxIcons/PackIconBoxIcons.cs
+++ b/src/IconPacks.Avalonia.BoxIcons/PackIconBoxIcons.cs
@@ -37,7 +37,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
protected override void SetKind(TKind iconKind)
{
- this.SetValue(KindProperty, iconKind);
+ this.SetCurrentValue(KindProperty, iconKind);
}
protected override void UpdateData()
diff --git a/src/IconPacks.Avalonia.BoxIcons/PackIconBoxIcons.xaml b/src/IconPacks.Avalonia.BoxIcons/PackIconBoxIcons.xaml
index 2474aad..00f0c32 100644
--- a/src/IconPacks.Avalonia.BoxIcons/PackIconBoxIcons.xaml
+++ b/src/IconPacks.Avalonia.BoxIcons/PackIconBoxIcons.xaml
@@ -7,37 +7,42 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/src/IconPacks.Avalonia/Converter/PackIconKindToImageConverter.cs b/src/IconPacks.Avalonia/Converter/PackIconKindToImageConverter.cs
new file mode 100644
index 0000000..0bb3b22
--- /dev/null
+++ b/src/IconPacks.Avalonia/Converter/PackIconKindToImageConverter.cs
@@ -0,0 +1,183 @@
+using Avalonia.Media;
+
+namespace IconPacks.Avalonia.Converter
+{
+ public class PackIconKindToImageConverter : PackIconKindToImageConverterBase
+ {
+ ///
+ protected override string GetPathData(object iconKind)
+ {
+ string data = null;
+ switch (iconKind)
+ {
+ // case PackIconBootstrapIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ case PackIconBoxIconsKind kind:
+ PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ return data;
+ // case PackIconCircumIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconCodiconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconCooliconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconEntypoKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconEvaIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconFeatherIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconFileIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconFontaudioKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconFontAwesomeKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconFontistoKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconForkAwesomeKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconGameIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconIoniconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconJamIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconLucideKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconMaterialKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconMaterialLightKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconMaterialDesignKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconMemoryIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconMicronsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconModernKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconOcticonsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconPhosphorIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconPicolIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconPixelartIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconRadixIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconRemixIconKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconRPGAwesomeKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconSimpleIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconTypiconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconUniconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconVaadinIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconWeatherIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconZondiconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ default:
+ return null;
+ }
+ }
+
+ ///
+ protected override ScaleTransform GetScaleTransform(object iconKind)
+ {
+ switch (iconKind)
+ {
+ // case PackIconBootstrapIconsKind _:
+ case PackIconBoxIconsKind _:
+ // case PackIconCodiconsKind _:
+ // case PackIconCooliconsKind _:
+ // case PackIconEvaIconsKind _:
+ // case PackIconFileIconsKind _:
+ // case PackIconFontaudioKind _:
+ // case PackIconFontistoKind _:
+ // case PackIconForkAwesomeKind _:
+ // case PackIconJamIconsKind _:
+ // case PackIconLucideKind _:
+ // case PackIconRPGAwesomeKind _:
+ // case PackIconTypiconsKind _:
+ // case PackIconVaadinIconsKind _:
+ return new ScaleTransform(1, -1);
+ default:
+ return new ScaleTransform(1, 1);
+ }
+ }
+
+ ///
+ protected override DrawingGroup GetDrawingGroup(object iconKind, IBrush foregroundBrush, string path)
+ {
+ var geometryDrawing = new GeometryDrawing
+ {
+ Geometry = Geometry.Parse(path)
+ };
+
+ // if (iconKind is PackIconFeatherIconsKind)
+ // {
+ // var pen = new Pen(foregroundBrush, 2d)
+ // {
+ // StartLineCap = PenLineCap.Round,
+ // EndLineCap = PenLineCap.Round,
+ // LineJoin = PenLineJoin.Round
+ // };
+ // geometryDrawing.Pen = pen;
+ // }
+ // else
+ {
+ geometryDrawing.Brush = foregroundBrush;
+ }
+
+ var drawingGroup = new DrawingGroup
+ {
+ Children = { geometryDrawing },
+ Transform = this.GetTransformGroup(iconKind)
+ };
+
+ return drawingGroup;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/IconPacks.Avalonia/IconPacks.Avalonia.csproj b/src/IconPacks.Avalonia/IconPacks.Avalonia.csproj
new file mode 100644
index 0000000..9df1227
--- /dev/null
+++ b/src/IconPacks.Avalonia/IconPacks.Avalonia.csproj
@@ -0,0 +1,32 @@
+
+
+
+ net8.0;net6.0;netstandard2.0
+ $(DefineConstants);AVALONIA
+ latest
+ disable
+ true
+
+
+
+ $(DefineConstants);ALL
+ IconPacks.Avalonia
+ IconPacks.Avalonia
+ IconPacks.Avalonia
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/IconPacks.Avalonia/Icons.xaml b/src/IconPacks.Avalonia/Icons.xaml
new file mode 100644
index 0000000..15bd6f4
--- /dev/null
+++ b/src/IconPacks.Avalonia/Icons.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/IconPacks.Avalonia/PackIconControl.cs b/src/IconPacks.Avalonia/PackIconControl.cs
new file mode 100644
index 0000000..053ff99
--- /dev/null
+++ b/src/IconPacks.Avalonia/PackIconControl.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Windows;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Controls.Metadata;
+using Avalonia.Media;
+using IconPacks.Avalonia;
+
+namespace IconPacks.Avalonia
+{
+ ///
+ ///
+ [PseudoClasses(":PackIconBoxIcons")]
+ public class PackIconControl : PackIconControlBase
+ {
+ public static readonly StyledProperty KindProperty
+ = AvaloniaProperty.Register(nameof(Kind));
+
+ ///
+ /// Gets or sets the icon to display.
+ ///
+ public Enum Kind
+ {
+ get { return GetValue(KindProperty); }
+ set { SetValue(KindProperty, value); }
+ }
+
+ // We override OnPropertyChanged of the base class. That way we can react on property changes
+ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
+ {
+ base.OnPropertyChanged(change);
+
+ // if the changed property is the KindProperty, we need to update the stars
+ if (change.Property == KindProperty)
+ {
+ UpdateData();
+ }
+ }
+
+ protected override void SetKind(TKind iconKind)
+ {
+ this.SetCurrentValue(KindProperty, iconKind);
+ }
+
+ protected override void UpdateData()
+ {
+ this.PseudoClasses.Set(":PackIconBoxIcons", Kind is PackIconBoxIconsKind);
+
+ if (Kind != default(Enum))
+ {
+ string data = null;
+ PackIconControlDataFactory.DataIndex.Value?.TryGetValue(Kind, out data);
+ this.Data = data != null ? StreamGeometry.Parse(data) : null;
+ }
+ else
+ {
+ this.Data = null;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/IconPacks.Avalonia/PackIconControl.xaml b/src/IconPacks.Avalonia/PackIconControl.xaml
new file mode 100644
index 0000000..dfad65b
--- /dev/null
+++ b/src/IconPacks.Avalonia/PackIconControl.xaml
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/IconPacks.Avalonia/PackIconControlDataFactory.cs b/src/IconPacks.Avalonia/PackIconControlDataFactory.cs
new file mode 100644
index 0000000..f5895c7
--- /dev/null
+++ b/src/IconPacks.Avalonia/PackIconControlDataFactory.cs
@@ -0,0 +1,169 @@
+using System;
+using System.Collections.Generic;
+
+namespace IconPacks.Avalonia
+{
+ /// ******************************************
+ /// This code is auto generated. Do not amend.
+ /// ******************************************
+ public static class PackIconControlDataFactory
+ {
+ public static Lazy> DataIndex { get; }
+
+ static PackIconControlDataFactory()
+ {
+ DataIndex = new Lazy>(Create);
+ }
+
+ internal static IDictionary Create()
+ {
+ var dictionary = new Dictionary();
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ foreach (var packIcon in PackIconDataFactory.Create())
+ {
+ dictionary.Add(packIcon.Key, packIcon.Value);
+ }
+
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ // foreach (var packIcon in PackIconDataFactory.Create())
+ // {
+ // dictionary.Add(packIcon.Key, packIcon.Value);
+ // }
+ return dictionary;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/IconPacks.Avalonia/PackIconExtension.cs b/src/IconPacks.Avalonia/PackIconExtension.cs
new file mode 100644
index 0000000..38bdf86
--- /dev/null
+++ b/src/IconPacks.Avalonia/PackIconExtension.cs
@@ -0,0 +1,171 @@
+using System;
+using Avalonia.Data;
+using Avalonia.Markup.Xaml;
+
+namespace IconPacks.Avalonia
+{
+ public class PackIconExtension : BasePackIconExtension
+ {
+ public PackIconExtension()
+ {
+ }
+
+ public PackIconExtension(Enum kind)
+ {
+ this.Kind = kind;
+ }
+
+ [ConstructorArgument("kind")] public Enum Kind { get; set; }
+
+ public override object ProvideValue(IServiceProvider serviceProvider)
+ {
+ // if (this.Kind is PackIconBootstrapIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconBootstrapIconsKind) this.Kind);
+ // }
+ if (this.Kind is PackIconBoxIconsKind)
+ {
+ return this.GetPackIcon((PackIconBoxIconsKind)this.Kind);
+ }
+
+ // if (this.Kind is PackIconCircumIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconCircumIconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconCodiconsKind)
+ // {
+ // return this.GetPackIcon((PackIconCodiconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconCooliconsKind)
+ // {
+ // return this.GetPackIcon((PackIconCooliconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconEntypoKind)
+ // {
+ // return this.GetPackIcon((PackIconEntypoKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconEvaIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconEvaIconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconFeatherIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconFeatherIconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconFileIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconFileIconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconFontaudioKind)
+ // {
+ // return this.GetPackIcon((PackIconFontaudioKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconFontAwesomeKind)
+ // {
+ // return this.GetPackIcon((PackIconFontAwesomeKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconFontistoKind)
+ // {
+ // return this.GetPackIcon((PackIconFontistoKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconForkAwesomeKind)
+ // {
+ // return this.GetPackIcon((PackIconForkAwesomeKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconGameIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconGameIconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconIoniconsKind)
+ // {
+ // return this.GetPackIcon((PackIconIoniconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconJamIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconJamIconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconLucideKind)
+ // {
+ // return this.GetPackIcon((PackIconLucideKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconMaterialKind)
+ // {
+ // return this.GetPackIcon((PackIconMaterialKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconMaterialLightKind)
+ // {
+ // return this.GetPackIcon((PackIconMaterialLightKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconMaterialDesignKind)
+ // {
+ // return this.GetPackIcon((PackIconMaterialDesignKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconMemoryIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconMemoryIconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconMicronsKind)
+ // {
+ // return this.GetPackIcon((PackIconMicronsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconModernKind)
+ // {
+ // return this.GetPackIcon((PackIconModernKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconOcticonsKind)
+ // {
+ // return this.GetPackIcon((PackIconOcticonsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconPhosphorIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconPhosphorIconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconPicolIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconPicolIconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconPixelartIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconPixelartIconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconRadixIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconRadixIconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconRemixIconKind)
+ // {
+ // return this.GetPackIcon((PackIconRemixIconKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconRPGAwesomeKind)
+ // {
+ // return this.GetPackIcon((PackIconRPGAwesomeKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconSimpleIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconSimpleIconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconTypiconsKind)
+ // {
+ // return this.GetPackIcon((PackIconTypiconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconUniconsKind)
+ // {
+ // return this.GetPackIcon((PackIconUniconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconVaadinIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconVaadinIconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconWeatherIconsKind)
+ // {
+ // return this.GetPackIcon((PackIconWeatherIconsKind) this.Kind);
+ // }
+ // if (this.Kind is PackIconZondiconsKind)
+ // {
+ // return this.GetPackIcon((PackIconZondiconsKind) this.Kind);
+ // }
+ //return null;
+ return BindingNotification.UnsetValue;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/IconPacks.Avalonia/PackIconImageExtension.cs b/src/IconPacks.Avalonia/PackIconImageExtension.cs
new file mode 100644
index 0000000..7575155
--- /dev/null
+++ b/src/IconPacks.Avalonia/PackIconImageExtension.cs
@@ -0,0 +1,201 @@
+using System;
+using Avalonia.Markup.Xaml;
+using Avalonia.Media;
+
+namespace IconPacks.Avalonia
+{
+ public class PackIconImageExtension : BasePackIconImageExtension
+ {
+ public PackIconImageExtension()
+ {
+ }
+
+ public PackIconImageExtension(Enum kind)
+ {
+ this.Kind = kind;
+ }
+
+ [ConstructorArgument("kind")] public Enum Kind { get; set; }
+
+ public override object ProvideValue(IServiceProvider serviceProvider)
+ {
+ return CreateImageSource(this.Kind, this.Brush ?? Brushes.Black);
+ }
+
+ ///
+ protected override string GetPathData(object iconKind)
+ {
+ string data = null;
+ switch (iconKind)
+ {
+ // case PackIconBootstrapIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ case PackIconBoxIconsKind kind:
+ PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ return data;
+ // case PackIconCircumIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconCodiconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconCooliconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconEntypoKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconEvaIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconFeatherIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconFileIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconFontaudioKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconFontAwesomeKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconFontistoKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconForkAwesomeKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconGameIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconIoniconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconJamIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconLucideKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconMaterialKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconMaterialLightKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconMaterialDesignKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconMemoryIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconMicronsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconModernKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconOcticonsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconPhosphorIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconPicolIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconPixelartIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconRadixIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconRemixIconKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconRPGAwesomeKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconSimpleIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconTypiconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconUniconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconVaadinIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconWeatherIconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ // case PackIconZondiconsKind kind:
+ // PackIconDataFactory.DataIndex.Value?.TryGetValue(kind, out data);
+ // return data;
+ default:
+ return null;
+ }
+ }
+
+ ///
+ protected override ScaleTransform GetScaleTransform(object iconKind)
+ {
+ switch (iconKind)
+ {
+ // case PackIconBootstrapIconsKind _:
+ case PackIconBoxIconsKind _:
+ // case PackIconCodiconsKind _:
+ // case PackIconCooliconsKind _:
+ // case PackIconEvaIconsKind _:
+ // case PackIconFileIconsKind _:
+ // case PackIconFontaudioKind _:
+ // case PackIconFontistoKind _:
+ // case PackIconForkAwesomeKind _:
+ // case PackIconJamIconsKind _:
+ // case PackIconLucideKind _:
+ // case PackIconRPGAwesomeKind _:
+ // case PackIconTypiconsKind _:
+ // case PackIconVaadinIconsKind _:
+ return new ScaleTransform(1, -1);
+ default:
+ return new ScaleTransform(1, 1);
+ }
+ }
+
+ ///
+ protected override DrawingGroup GetDrawingGroup(object iconKind, IBrush foregroundBrush, string path)
+ {
+ var geometryDrawing = new GeometryDrawing
+ {
+ Geometry = Geometry.Parse(path)
+ };
+
+ // if (iconKind is PackIconFeatherIconsKind)
+ // {
+ // var pen = new Pen(foregroundBrush, 2d)
+ // {
+ // StartLineCap = PenLineCap.Round,
+ // EndLineCap = PenLineCap.Round,
+ // LineJoin = PenLineJoin.Round
+ // };
+ // geometryDrawing.Pen = pen;
+ // }
+ // else
+ {
+ geometryDrawing.Brush = foregroundBrush;
+ }
+
+ var drawingGroup = new DrawingGroup
+ {
+ Children = { geometryDrawing },
+ Transform = this.GetScaleTransform(iconKind)
+ };
+
+ return drawingGroup;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/IconPacks.Avalonia/Properties/AssemblyInfo.cs b/src/IconPacks.Avalonia/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..54c6fc0
--- /dev/null
+++ b/src/IconPacks.Avalonia/Properties/AssemblyInfo.cs
@@ -0,0 +1,9 @@
+using System.Runtime.InteropServices;
+using Avalonia.Metadata;
+
+[assembly: XmlnsPrefix("urn:iconpacks-avalonia", "iconPacks")]
+[assembly: XmlnsDefinition("urn:iconpacks-avalonia", "IconPacks")]
+[assembly: XmlnsDefinition("urn:iconpacks-avalonia", "IconPacks.Avalonia")]
+[assembly: XmlnsDefinition("urn:iconpacks-avalonia", "IconPacks.Avalonia.Converter")]
+
+[assembly: ComVisible(false)]