From 3c498439b4c1e459c83d9803135c48547c7f1319 Mon Sep 17 00:00:00 2001 From: Dominik Titl <78549750+morning4coffe-dev@users.noreply.github.com> Date: Sat, 30 Mar 2024 11:08:27 +0100 Subject: [PATCH] chore: Internally implement Selector methods --- .../Controls/Primitives/Selector_Partial.cs | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/Uno.UI/UI/Xaml/Controls/Primitives/Selector_Partial.cs b/src/Uno.UI/UI/Xaml/Controls/Primitives/Selector_Partial.cs index a80b2b9e6462..95c50c12b134 100644 --- a/src/Uno.UI/UI/Xaml/Controls/Primitives/Selector_Partial.cs +++ b/src/Uno.UI/UI/Xaml/Controls/Primitives/Selector_Partial.cs @@ -11,6 +11,7 @@ using Windows.Foundation.Collections; using Microsoft.UI.Xaml.Data; using Uno.Disposables; +using Microsoft.UI.Xaml.Input; namespace Microsoft.UI.Xaml.Controls.Primitives; @@ -306,4 +307,37 @@ internal virtual void NotifyListItemSelected(SelectorItem pSelectorItem, bool ol // // SelectionChanged event handler // return S_OK; } + + /// + /// Handles selection of single item, and only that item + /// + internal void MakeSingleSelection(int index, bool animateIfBringIntoView, object selectedItem, FocusNavigationDirection focusNavigationDirection) + { + //UNO TODO: Implement SelectJustThisItemInternal on Selector + //SelectJustThisItemInternal(SelectedIndex, index, selectedItem, animateIfBringIntoView, focusNavigationDirection); + } + + internal void ScrollIntoViewInternal(object item, bool isHeader, bool isFooter, bool isFromPublicAPI, ScrollIntoViewAlignment alignment, double offset, bool animateIfBringIntoView) + { + //UNO TODO: Implement ScrollIntoViewInternal on Selector + } + + internal void AutomationPeerAddToSelection(int index, object item) + { + //UNO TODO: Implement AutomationPeerAddToSelection on Selector + } + + internal void AutomationPeerRemoveFromSelection(int index, object item) + { + //UNO TODO: Implement AutomationPeerRemoveFromSelection on Selector + } + + internal bool AutomationPeerIsSelected(object item) + { + //UNO TODO: Implement AutomationPeerIsSelected on Selector + + return false; + } + + internal bool IsSelectionPatternApplicable() => true; }