calculator/src/Calculator/Controls/AppBar.h
Howard Wolosky c13b8a099e Hello GitHub
2019-01-28 16:24:37 -08:00

30 lines
763 B
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "Common\KeyboardShortcutManager.h"
namespace CalculatorApp
{
namespace Controls
{
public ref class AppBar sealed : public Windows::UI::Xaml::Controls::AppBar
{
public:
AppBar()
{}
protected:
virtual void OnKeyDown(Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e) override
{
Windows::UI::Xaml::Controls::AppBar::OnKeyDown(e);
if (e->Key == Windows::System::VirtualKey::Escape)
{
Common::KeyboardShortcutManager::IgnoreEscape(true);
}
}
};
}
}