calculator/src/Calculator/Controls/CalculationResultAutomationPeer.cpp
Daniel Belcher 9f01c8168b
Secondary formatting changes (#489)
Description of the changes:
Adjusted some of the values in .clang-format
Add clang-format-all.ps1
Fix path to .clang-format in Calculator.sln

How changes were validated:
Manual.
2019-05-02 16:48:33 -07:00

38 lines
1.0 KiB
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "pch.h"
#include "CalculationResultAutomationPeer.h"
using namespace Windows::UI::Xaml;
using namespace Windows::UI::Xaml::Automation::Peers;
namespace CalculatorApp::Controls
{
CalculationResultAutomationPeer::CalculationResultAutomationPeer(FrameworkElement ^ owner)
: FrameworkElementAutomationPeer(owner)
{
}
AutomationControlType CalculationResultAutomationPeer::GetAutomationControlTypeCore()
{
return AutomationControlType::Text;
}
Platform::Object ^ CalculationResultAutomationPeer::GetPatternCore(PatternInterface pattern)
{
if (pattern == PatternInterface::Invoke)
{
return this;
}
return FrameworkElementAutomationPeer::GetPatternCore(pattern);
}
void CalculationResultAutomationPeer::Invoke()
{
auto owner = static_cast<CalculationResult ^>(this->Owner);
owner->ProgrammaticSelect();
}
}