Skip to content

Commit

Permalink
feat: Implement ListBoxItemDataAutomationPeer
Browse files Browse the repository at this point in the history
  • Loading branch information
morning4coffe-dev authored and MartinZikmund committed Jun 17, 2024
1 parent b2f4ff2 commit 777a9d8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
#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 ListBoxItemDataAutomationPeer : global::Microsoft.UI.Xaml.Automation.Peers.SelectorItemAutomationPeer, global::Microsoft.UI.Xaml.Automation.Provider.IScrollItemProvider
{
#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 ListBoxItemDataAutomationPeer(object item, global::Microsoft.UI.Xaml.Automation.Peers.ListBoxAutomationPeer parent) : base(item, parent)
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Microsoft.UI.Xaml.Automation.Peers.ListBoxItemDataAutomationPeer", "ListBoxItemDataAutomationPeer.ListBoxItemDataAutomationPeer(object item, ListBoxAutomationPeer parent)");
}
#endif
// Forced skipping of method Microsoft.UI.Xaml.Automation.Peers.ListBoxItemDataAutomationPeer.ListBoxItemDataAutomationPeer(object, Microsoft.UI.Xaml.Automation.Peers.ListBoxAutomationPeer)
#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 void ScrollIntoView()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
// MUX Reference ListBoxItemDataAutomationPeer_Partial.cpp, tag winui3/release/1.4.2
namespace Microsoft.UI.Xaml.Automation.Peers;

/// <summary>
/// Exposes ListBox items to Microsoft UI Automation, using a data representation of the item
/// so that the peer supports scrolling to that item with data awareness.
/// </summary>
public partial class ListBoxItemDataAutomationPeer : SelectorItemAutomationPeer, Provider.IScrollItemProvider
{
public ListBoxItemDataAutomationPeer(object item, ListBoxAutomationPeer parent) : base(item, parent)
{

}

protected override string GetClassNameCore() => nameof(Controls.ListBoxItem);

protected override AutomationControlType GetAutomationControlTypeCore()
=> AutomationControlType.ListItem;

public void ScrollIntoView()
{
ScrollIntoView();
}
}

0 comments on commit 777a9d8

Please sign in to comment.