feat: implement inner content interface.

This commit is contained in:
rabbitism
2025-09-16 19:20:02 +08:00
parent 7603206b3d
commit 0173ee7c9c
5 changed files with 76 additions and 30 deletions

View File

@@ -511,5 +511,23 @@ public partial class MultiAutoCompleteBox
{
get => GetValue(InnerRightContentProperty);
set => SetValue(InnerRightContentProperty, value);
}
}
public static readonly StyledProperty<object?> PopupInnerTopContentProperty = AvaloniaProperty.Register<MultiAutoCompleteBox, object?>(
nameof(PopupInnerTopContent));
public object? PopupInnerTopContent
{
get => GetValue(PopupInnerTopContentProperty);
set => SetValue(PopupInnerTopContentProperty, value);
}
public static readonly StyledProperty<object?> PopupInnerBottomContentProperty = AvaloniaProperty.Register<MultiAutoCompleteBox, object?>(
nameof(PopupInnerBottomContent));
public object? PopupInnerBottomContent
{
get => GetValue(PopupInnerBottomContentProperty);
set => SetValue(PopupInnerBottomContentProperty, value);
}
}

View File

@@ -30,7 +30,7 @@ namespace Ursa.Controls;
[TemplatePart(ElementSelectionAdapter, typeof(ISelectionAdapter))]
[TemplatePart(ElementTextBox, typeof(TextBox))]
[PseudoClasses(":dropdownopen")]
public partial class MultiAutoCompleteBox : TemplatedControl, IInnerContentControl
public partial class MultiAutoCompleteBox : TemplatedControl, IInnerContentControl, IPopupInnerContent
{
/// <summary>
/// Specifies the name of the selection adapter TemplatePart.