Fixes bug #483 by setting AccessibilityView property to Raw for hidden units

* Fixes bug #483 by setting AccessibilityView property to Raw for hidden units
This commit is contained in:
Wei (Waley) Zhang 2019-06-12 17:37:19 -07:00 committed by Pepe Rivera
parent 81aec1ebe8
commit 7276b5c7ce

View File

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
@ -12,6 +12,8 @@
using namespace std;
using namespace CalculatorApp::Controls;
using namespace Windows::Foundation;
using namespace Windows::UI::Xaml::Automation;
using namespace Windows::UI::Xaml::Automation::Peers;
Size HorizontalNoOverflowStackPanel::MeasureOverride(Size availableSize)
{
@ -57,12 +59,14 @@ Size HorizontalNoOverflowStackPanel::ArrangeOverride(Size finalSize)
{
// stack the items horizontally (left to right)
item->Arrange(Rect(posX, 0, itemWidth, finalSize.Height));
AutomationProperties::SetAccessibilityView(item, ::AccessibilityView::Content);
posX += item->RenderSize.Width;
}
else
{
// Not display the item
item->Arrange(Rect(0, 0, 0, 0));
AutomationProperties::SetAccessibilityView(item, ::AccessibilityView::Raw);
}
}
return finalSize;