// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "pch.h" #include "CalcViewModel/Common/AppResourceProvider.h" #include "CalcViewModel/Common/LocalizationStringUtil.h" #include "EquationTextBox.h" using namespace std; using namespace Platform; using namespace CalculatorApp; using namespace CalculatorApp::Common; using namespace CalculatorApp::Controls; using namespace Windows::System; using namespace Windows::Foundation; using namespace Windows::ApplicationModel; using namespace Windows::UI::Text; using namespace Windows::UI::Xaml; using namespace Windows::UI::Xaml::Automation; using namespace Windows::UI::Xaml::Controls; using namespace Windows::UI::Xaml::Input; using namespace Windows::UI::Xaml::Controls::Primitives; DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, EquationColor); DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, ColorChooserFlyout); DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, EquationButtonContentIndex); DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, HasError); DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, IsAddEquationMode); DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, MathEquation); DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, IsEquationLineDisabled); EquationTextBox::EquationTextBox() { } void EquationTextBox::OnApplyTemplate() { m_equationButton = dynamic_cast(GetTemplateChild("EquationButton")); m_richEditBox = dynamic_cast(GetTemplateChild("MathRichEditBox")); m_deleteButton = dynamic_cast