From b0e24c6f4c1c79b7cb4afc7d6208276909de7fcb Mon Sep 17 00:00:00 2001
From: Stephanie Anderl <46726333+sanderl@users.noreply.github.com>
Date: Tue, 5 Mar 2019 17:27:07 -0800
Subject: [PATCH 1/2] Updated UnitConvert ComboBox and Programmer Mode Radio
Button Styles to Enable IsTextScaleFactorEnabled (#92)
---
src/Calculator/Views/CalculatorProgrammerOperators.xaml | 2 +-
src/Calculator/Views/UnitConverter.xaml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Calculator/Views/CalculatorProgrammerOperators.xaml b/src/Calculator/Views/CalculatorProgrammerOperators.xaml
index 3732e11f..97b216a9 100644
--- a/src/Calculator/Views/CalculatorProgrammerOperators.xaml
+++ b/src/Calculator/Views/CalculatorProgrammerOperators.xaml
@@ -25,7 +25,7 @@
-
+
diff --git a/src/Calculator/Views/UnitConverter.xaml b/src/Calculator/Views/UnitConverter.xaml
index 135abff9..7afc660d 100644
--- a/src/Calculator/Views/UnitConverter.xaml
+++ b/src/Calculator/Views/UnitConverter.xaml
@@ -59,7 +59,7 @@
-
+
From b865b1b2aaa8a5c68ff18b2e5b3d5273e5c37f55 Mon Sep 17 00:00:00 2001
From: Stephanie Anderl <46726333+sanderl@users.noreply.github.com>
Date: Tue, 5 Mar 2019 20:26:37 -0800
Subject: [PATCH 2/2] Add Checked Event Handler to Add/Subtract Radio Buttons
to enable Narrator (#91)
* added bug report and feature request issue tempaltes
* copied pull_request_template.md to .github folder
* Updated the DateCalculation narrator logic to use PropertyChangedCallbacks for the DateResultLabel and DateDiffAllUnitsResultLabel TextBlocks.
* Reverted textblock callback changes and added an event handler for when the radio buttons are checked.
* Revert NarratorAnnouncement.h changes and removed unused code from DataCalculator.xaml.h. Updated comments in RaiseNotification method in DateCalculator.xaml.cpp
* Reverted changes in NarratorAnnouncement.h and NarratorAnnouncement.cpp
* Added SAL annotation to AddSubtractOption_Checked
* Remove namespaces from input types on AddSubtractOption_Checked
---
src/Calculator/Views/DateCalculator.xaml | 2 ++
src/Calculator/Views/DateCalculator.xaml.cpp | 7 ++++++-
src/Calculator/Views/DateCalculator.xaml.h | 3 ++-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/Calculator/Views/DateCalculator.xaml b/src/Calculator/Views/DateCalculator.xaml
index 4bb8d5b1..bcf2cae3 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 be7b7378..386e5243 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 ad5917a5..414dc6bb 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);