From b2f4ff27b985e9f8a18021019c121c480426642b Mon Sep 17 00:00:00 2001 From: morning4coffe-dev <78549750+morning4coffe-dev@users.noreply.github.com> Date: Wed, 10 Jan 2024 23:45:44 +0100 Subject: [PATCH] feat: Add ListBoxAutomationPeer --- .../ListBoxAutomationPeer.cs | 4 ++-- .../Automation/Peers/ListBoxAutomationPeer.cs | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 src/Uno.UI/UI/Xaml/Automation/Peers/ListBoxAutomationPeer.cs diff --git a/src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Automation.Peers/ListBoxAutomationPeer.cs b/src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Automation.Peers/ListBoxAutomationPeer.cs index 464886bd0039..0f21f429c3e0 100644 --- a/src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Automation.Peers/ListBoxAutomationPeer.cs +++ b/src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Automation.Peers/ListBoxAutomationPeer.cs @@ -3,12 +3,12 @@ #pragma warning disable 114 // new keyword hiding namespace Microsoft.UI.Xaml.Automation.Peers { -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false [global::Uno.NotImplemented] #endif public partial class ListBoxAutomationPeer : global::Microsoft.UI.Xaml.Automation.Peers.SelectorAutomationPeer { -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false [global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")] public ListBoxAutomationPeer(global::Microsoft.UI.Xaml.Controls.ListBox owner) : base(owner) { diff --git a/src/Uno.UI/UI/Xaml/Automation/Peers/ListBoxAutomationPeer.cs b/src/Uno.UI/UI/Xaml/Automation/Peers/ListBoxAutomationPeer.cs new file mode 100644 index 000000000000..76db58114178 --- /dev/null +++ b/src/Uno.UI/UI/Xaml/Automation/Peers/ListBoxAutomationPeer.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. +// MUX Reference ListBoxAutomationPeer_Partial.cpp, tag winui3/release/1.4.2 +namespace Microsoft.UI.Xaml.Automation.Peers; + +/// +/// Exposes ListBox types to UI Automation. +/// +public partial class ListBoxAutomationPeer : SelectorAutomationPeer +{ + public ListBoxAutomationPeer(Controls.ListBox owner) : base(owner) + { + + } + + protected override string GetClassNameCore() => nameof(Controls.ListBox); + + protected override AutomationControlType GetAutomationControlTypeCore() + => AutomationControlType.List; +}