diff --git a/src/Calculator/Views/DateCalculator.xaml b/src/Calculator/Views/DateCalculator.xaml index 4bb8d5b..bcf2cae 100644 --- a/src/Calculator/Views/DateCalculator.xaml +++ b/src/Calculator/Views/DateCalculator.xaml @@ -516,6 +516,7 @@ MinWidth="80" MaxWidth="160" VerticalAlignment="Top" + Checked="AddSubtractOption_Checked" IsChecked="{Binding IsAddMode, Mode=TwoWay}"/> diff --git a/src/Calculator/Views/DateCalculator.xaml.cpp b/src/Calculator/Views/DateCalculator.xaml.cpp index be7b737..386e524 100644 --- a/src/Calculator/Views/DateCalculator.xaml.cpp +++ b/src/Calculator/Views/DateCalculator.xaml.cpp @@ -209,7 +209,7 @@ void DateCalculator::ReselectCalendarDate(_In_ Windows::UI::Xaml::Controls::Cale void DateCalculator::OffsetDropDownClosed(_In_ Object^ sender, _In_ Object^ e) { - RaiseLiveRegionChangedAutomationEvent(false); + RaiseLiveRegionChangedAutomationEvent(/* DateDiff mode */ false); } void DateCalculator::CalendarFlyoutClosed(_In_ Object^ sender, _In_ Object^ e) @@ -224,3 +224,8 @@ void DateCalculator::RaiseLiveRegionChangedAutomationEvent(_In_ bool isDateDiffM String^ automationName = AutomationProperties::GetName(resultTextBlock); TextBlockAutomationPeer::FromElement(resultTextBlock)->RaiseAutomationEvent(AutomationEvents::LiveRegionChanged); } + +void DateCalculator::AddSubtractOption_Checked(_In_ Object^ sender, _In_ RoutedEventArgs^ e) +{ + RaiseLiveRegionChangedAutomationEvent(/* DateDiff mode */ false); +} diff --git a/src/Calculator/Views/DateCalculator.xaml.h b/src/Calculator/Views/DateCalculator.xaml.h index ad5917a..414dc6b 100644 --- a/src/Calculator/Views/DateCalculator.xaml.h +++ b/src/Calculator/Views/DateCalculator.xaml.h @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // @@ -38,6 +38,7 @@ namespace CalculatorApp void OnLoaded(_In_ Platform::Object^ sender, _In_ Windows::UI::Xaml::RoutedEventArgs^ e); void DateCalcOption_Changed(_In_ Platform::Object^ sender, _In_ Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e); void AddSubtractDateGrid_Loaded(_In_ Platform::Object^ sender, _In_ Windows::UI::Xaml::RoutedEventArgs^ e); + void AddSubtractOption_Checked(_In_ Platform::Object^ sender, _In_ Windows::UI::Xaml::RoutedEventArgs^ e); void ReselectCalendarDate(_In_ Windows::UI::Xaml::Controls::CalendarDatePicker^ calendarDatePicker, Windows::Foundation::DateTime dateTime); void OffsetDropDownClosed(_In_ Platform::Object^ sender, _In_ Platform::Object^ e); void CalendarFlyoutClosed(_In_ Platform::Object^ sender, _In_ Platform::Object^ e);