diff --git a/src/OneWare.Essentials/Controls/DocumentUiExtensionCollection.axaml b/src/OneWare.Essentials/Controls/DocumentUiExtensionCollection.axaml
new file mode 100644
index 0000000..175b480
--- /dev/null
+++ b/src/OneWare.Essentials/Controls/DocumentUiExtensionCollection.axaml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
diff --git a/src/OneWare.Essentials/Controls/DocumentUiExtensionCollection.axaml.cs b/src/OneWare.Essentials/Controls/DocumentUiExtensionCollection.axaml.cs
new file mode 100644
index 0000000..fde9e0c
--- /dev/null
+++ b/src/OneWare.Essentials/Controls/DocumentUiExtensionCollection.axaml.cs
@@ -0,0 +1,40 @@
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using Avalonia;
+using Avalonia.Controls.Primitives;
+using Avalonia.Layout;
+using OneWare.Essentials.Models;
+
+namespace OneWare.Essentials.Controls;
+
+public class DocumentUiExtensionCollection : TemplatedControl
+{
+ public static readonly StyledProperty FileProperty =
+ AvaloniaProperty.Register(nameof(File));
+
+ public static readonly StyledProperty?> ExtensionsProperty =
+ AvaloniaProperty.Register?>(nameof(Extensions));
+
+ public static readonly StyledProperty OrientationProperty =
+ AvaloniaProperty.Register(nameof(Orientation));
+
+ protected override Type StyleKeyOverride => typeof(DocumentUiExtensionCollection);
+
+ public IFile? File
+ {
+ get => GetValue(FileProperty);
+ set => SetValue(FileProperty, value);
+ }
+
+ public ObservableCollection? Extensions
+ {
+ get => GetValue(ExtensionsProperty);
+ set => SetValue(ExtensionsProperty, value);
+ }
+
+ public Orientation Orientation
+ {
+ get => GetValue(OrientationProperty);
+ set => SetValue(OrientationProperty, value);
+ }
+}
\ No newline at end of file
diff --git a/src/OneWare.Essentials/Controls/SharedControls.axaml b/src/OneWare.Essentials/Controls/SharedControls.axaml
index f0436f8..fabbd55 100644
--- a/src/OneWare.Essentials/Controls/SharedControls.axaml
+++ b/src/OneWare.Essentials/Controls/SharedControls.axaml
@@ -5,4 +5,5 @@
+
\ No newline at end of file
diff --git a/src/OneWare.Essentials/Controls/UiExtensionCollection.axaml b/src/OneWare.Essentials/Controls/UiExtensionCollection.axaml
index 5f0835b..70502d4 100644
--- a/src/OneWare.Essentials/Controls/UiExtensionCollection.axaml
+++ b/src/OneWare.Essentials/Controls/UiExtensionCollection.axaml
@@ -14,7 +14,7 @@
-
+
diff --git a/src/OneWare.Essentials/Controls/UiExtensionCollection.axaml.cs b/src/OneWare.Essentials/Controls/UiExtensionCollection.axaml.cs
index 122ea2c..68711f7 100644
--- a/src/OneWare.Essentials/Controls/UiExtensionCollection.axaml.cs
+++ b/src/OneWare.Essentials/Controls/UiExtensionCollection.axaml.cs
@@ -2,6 +2,7 @@
using System.Collections.Specialized;
using Avalonia;
using Avalonia.Controls.Primitives;
+using Avalonia.Layout;
using OneWare.Essentials.Models;
namespace OneWare.Essentials.Controls;
@@ -9,29 +10,22 @@ namespace OneWare.Essentials.Controls;
public class UiExtensionCollection : TemplatedControl
{
public static readonly StyledProperty?> ExtensionsProperty =
- AvaloniaProperty.Register?>(nameof(UiExtensionCollection));
+ AvaloniaProperty.Register?>(nameof(Extensions));
+
+ public static readonly StyledProperty OrientationProperty =
+ AvaloniaProperty.Register(nameof(Orientation));
protected override Type StyleKeyOverride => typeof(UiExtensionCollection);
public ObservableCollection? Extensions
{
get => GetValue(ExtensionsProperty);
- set
- {
- if(Extensions != null)
- Extensions.CollectionChanged -= OnExtensionsChanged;
-
- SetValue(ExtensionsProperty, value);
-
- if (value == null)
- return;
-
- value.CollectionChanged += OnExtensionsChanged;
- }
+ set => SetValue(ExtensionsProperty, value);
}
- private void OnExtensionsChanged(object? sender, NotifyCollectionChangedEventArgs e)
+ public Orientation Orientation
{
-
+ get => GetValue(OrientationProperty);
+ set => SetValue(OrientationProperty, value);
}
}
\ No newline at end of file
diff --git a/src/OneWare.Essentials/Converters/DocumentUiExtensionConverter.cs b/src/OneWare.Essentials/Converters/DocumentUiExtensionConverter.cs
new file mode 100644
index 0000000..430c65c
--- /dev/null
+++ b/src/OneWare.Essentials/Converters/DocumentUiExtensionConverter.cs
@@ -0,0 +1,26 @@
+using System.Globalization;
+using Avalonia.Controls;
+using Avalonia.Data.Converters;
+using OneWare.Essentials.Models;
+
+namespace OneWare.Essentials.Converters;
+
+public class DocumentUiExtensionConverter : IMultiValueConverter
+{
+ public object? Convert(IList