calculator/src/Calculator/Views/GraphingCalculator/GraphingSettings.xaml.h
Stephanie Anderl cf735bbcf5
Dark Theme For Graph Control (#1106)
* Added dark them to graph control, started dark theme for the controls on the graph

* Dark theme for graphing mode updated to use event model, diagnostics added, cleaned up code that wasn't needed

* Updated prepare-release-internalonly.yaml internal package version

* Updated Theme Settings properties, removed version change, other small changes from PR feedback>

* Updated the localSettings check and updated the GraphTheme event to send bool instead of string

* Updated the equation line color to change with the graph theme

* Rebased onto master and issues created during the rebase

* Updates per code review feedback

* Update settings properties to just have IsMatchAppTheme property and updated the high contrast settings for the graph control

* Match version to current in master

* Updated per PR feedback

* Fix resetting the m_lastLineColorIndex to only happen when reassignColors is true

* Changed second if to else if in the OnPropertyChanged method

* fixed control button and equation line colors
2020-03-27 17:20:35 -07:00

57 lines
1.7 KiB
C++

//
// MyUserControl.xaml.h
// Declaration of the MyUserControl class
//
#pragma once
#include "CalcViewModel/Common/Utils.h"
#include "CalcViewModel/GraphingCalculator/GraphingSettingsViewModel.h"
#include "Views\GraphingCalculator\GraphingSettings.g.h"
#include <CalcViewModel\GraphingCalculator\GraphingCalculatorViewModel.h>
namespace CalculatorApp
{
[Windows::Foundation::Metadata::WebHostHidden] public ref class GraphingSettings sealed
{
public:
GraphingSettings();
PROPERTY_RW(CalculatorApp::ViewModel::GraphingSettingsViewModel ^, ViewModel);
property bool IsMatchAppTheme
{
bool get()
{
return m_IsMatchAppTheme;
}
void set(bool value)
{
if (m_IsMatchAppTheme == value)
{
return;
}
m_IsMatchAppTheme = value;
SetGraphTheme(m_IsMatchAppTheme);
}
}
Windows::UI::Xaml::Style ^ SelectTextBoxStyle(bool incorrectRange, bool error);
void SetGrapher(GraphControl::Grapher ^ grapher);
void RefreshRanges();
static Platform::String ^ GetLineWidthAutomationName(double width);
// Event sends the if the IsMatchAppTheme is selected
event Windows::Foundation::EventHandler<bool> ^ GraphThemeSettingChanged;
private:
void GridSettingsTextBox_PreviewKeyDown(Platform::Object ^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs ^ e);
void ResetViewButton_Clicked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
void SetGraphTheme(bool isMatchAppTheme);
bool m_IsMatchAppTheme;
};
}