internal void AutomationSelect() { LoopingSelector pLoopingSelectorNoRef = null; GetParentNoRef(out pLoopingSelectorNoRef); pLoopingSelectorNoRef.AutomationScrollToVisualIdx(_visualIndex, true /* ignoreScrollingState */); }
internal void AutomationGetIsSelected(out bool value) { LoopingSelector loopingSelectorNoRef = null; int selectedIdx; GetParentNoRef(out loopingSelectorNoRef); selectedIdx = loopingSelectorNoRef.SelectedIndex; uint itemIndex = 0; loopingSelectorNoRef.VisualIndexToItemIndex((uint)_visualIndex, out itemIndex); value = selectedIdx == (int)itemIndex; }
internal void AutomationGetSelectionContainerUIAPeer(out AutomationPeer ppPeer) { //wrl.ComPtr<xaml.Automation.Peers.FrameworkElementAutomationPeerStatics> spAutomationPeerStatics; AutomationPeer spAutomationPeer; UIElement spLoopingSelectorAsUI; LoopingSelector pLoopingSelectorNoRef = null; GetParentNoRef(out pLoopingSelectorNoRef); //(pLoopingSelectorNoRef.QueryInterface( // __uuidof(UIElement), // &spLoopingSelectorAsUI)); spLoopingSelectorAsUI = this; //(wf.GetActivationFactory( // wrl_wrappers.Hstring(RuntimeClass_Microsoft_UI_Xaml_Automation_Peers_FrameworkElementAutomationPeer), // &spAutomationPeerStatics)); //spAutomationPeerStatics.CreatePeerForElement(spLoopingSelectorAsUI, &spAutomationPeer); spAutomationPeer = FrameworkElementAutomationPeer.CreatePeerForElement(spLoopingSelectorAsUI); //spAutomationPeer.CopyTo(ppPeer); ppPeer = spAutomationPeer; }