diff --git a/src/Aura.UI.FluentTheme/AppBuilderExtensions.cs b/src/Aura.UI.FluentTheme/AppBuilderExtensions.cs index 22c81b7..7ef2548 100644 --- a/src/Aura.UI.FluentTheme/AppBuilderExtensions.cs +++ b/src/Aura.UI.FluentTheme/AppBuilderExtensions.cs @@ -1,4 +1,5 @@ -using Avalonia.Controls; +using Avalonia; +using Avalonia.Controls; using Avalonia.Markup.Xaml.Styling; using Avalonia.Styling; using System; @@ -8,7 +9,7 @@ namespace Aura.UI.FluentTheme { public static class AppBuilderExtensions { - public static TAppBuilder UseAuraUIFluentTheme(this TAppBuilder appBuilder) where TAppBuilder : AppBuilderBase, new() + public static AppBuilder UseAuraUIFluentTheme(this AppBuilder appBuilder) { appBuilder.AfterSetup(x => { diff --git a/src/Aura.UI/Controls/Navigation/NavigationView/NavigationView.cs b/src/Aura.UI/Controls/Navigation/NavigationView/NavigationView.cs index 36c0169..3f71ac9 100644 --- a/src/Aura.UI/Controls/Navigation/NavigationView/NavigationView.cs +++ b/src/Aura.UI/Controls/Navigation/NavigationView/NavigationView.cs @@ -15,7 +15,7 @@ namespace Aura.UI.Controls.Navigation { [PseudoClasses(":normal", ":compact")] - public partial class NavigationView : TreeView, IItemsPresenterHost, IContentPresenterHost, IHeadered + public partial class NavigationView : TreeView { private Button _headeritem; private SplitView _splitVw; @@ -95,16 +95,6 @@ internal void SelectSingleItemCore(object item) SelectedItems.Clear(); SelectedItems.Add(item); - //var item_parents = (item as ILogical).GetLogicalAncestors().OfType(); - - //if (this.IsOpen) - //{ - // foreach (NavigationViewItem n in item_parents) - // { - // n.IsExpanded = true; - // } - //} - SelectedItem = item; } internal void SelectSingleItem(object item) @@ -160,42 +150,6 @@ protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e SelectSingleItem(s); } - - /// - IAvaloniaList IContentPresenterHost.LogicalChildren => LogicalChildren; - - private IContentPresenter ContentPart { get; set; } - - bool IContentPresenterHost.RegisterContentPresenter(IContentPresenter presenter) - { - return RegisterContentPresenter(presenter); - } - - /// - protected virtual bool RegisterContentPresenter(IContentPresenter presenter) - { - if (presenter.Name == "PART_SelectedContentPresenter") - { - ContentPart = presenter; - return true; - } - return false; - } - - /// - protected override void OnContainersMaterialized(ItemContainerEventArgs e) - { - base.OnContainersMaterialized(e); - UpdateTitleAndSelectedContent(); - } - - /// - protected override void OnContainersDematerialized(ItemContainerEventArgs e) - { - base.OnContainersDematerialized(e); - UpdateTitleAndSelectedContent(); - } - protected virtual void OnIsOpenChanged(object sender, AvaloniaPropertyChangedEventArgs e) { UpdateHeaderVisibility(); diff --git a/src/Aura.UI/Controls/Navigation/NavigationView/NavigationViewItemBase.cs b/src/Aura.UI/Controls/Navigation/NavigationView/NavigationViewItemBase.cs index 618f1f4..8763adb 100644 --- a/src/Aura.UI/Controls/Navigation/NavigationView/NavigationViewItemBase.cs +++ b/src/Aura.UI/Controls/Navigation/NavigationView/NavigationViewItemBase.cs @@ -8,7 +8,7 @@ namespace Aura.UI.Controls.Navigation { [PseudoClasses(":opened", ":closed", ":selected", ":compact")] - public partial class NavigationViewItemBase : TreeViewItem, IHeadered + public partial class NavigationViewItemBase : TreeViewItem { private object _content = "Content"; static NavigationViewItemBase() diff --git a/src/Aura.UI/Controls/Navigation/NavigationView/NavigationViewLinker.cs b/src/Aura.UI/Controls/Navigation/NavigationView/NavigationViewLinker.cs index 778cd0b..3deab7e 100644 --- a/src/Aura.UI/Controls/Navigation/NavigationView/NavigationViewLinker.cs +++ b/src/Aura.UI/Controls/Navigation/NavigationView/NavigationViewLinker.cs @@ -53,10 +53,9 @@ protected override void OnPointerPressed(PointerPressedEventArgs e) PseudoClasses.Add(":pressed"); } - /// - protected override void OnPointerLeave(PointerEventArgs e) + protected override void OnPointerExited(PointerEventArgs e) { - base.OnPointerLeave(e); + base.OnPointerExited(e); _pointerOver = false; } } diff --git a/src/Aura.UI/Controls/Sliders/RadialSlider.cs b/src/Aura.UI/Controls/Sliders/RadialSlider.cs index 7ffa802..a6a2922 100644 --- a/src/Aura.UI/Controls/Sliders/RadialSlider.cs +++ b/src/Aura.UI/Controls/Sliders/RadialSlider.cs @@ -22,9 +22,9 @@ static RadialSlider() StrokeWidthProperty.Changed.Subscribe(UpdateRadius); - MaximumProperty.OverrideMetadata(new DirectPropertyMetadata(100)); - MinimumProperty.OverrideMetadata(new DirectPropertyMetadata(0)); - ValueProperty.OverrideMetadata(new DirectPropertyMetadata(25)); + MaximumProperty.OverrideMetadata(new StyledPropertyMetadata(100)); + MinimumProperty.OverrideMetadata(new StyledPropertyMetadata(0)); + ValueProperty.OverrideMetadata(new StyledPropertyMetadata(25)); AffectsRender(XAngleProperty, YAngleProperty); }