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
This commit is contained in:
Stephanie Anderl
2020-03-27 17:20:35 -07:00
committed by GitHub
parent 780e53780d
commit cf735bbcf5
23 changed files with 389 additions and 89 deletions

View File

@@ -25,6 +25,7 @@ using namespace GraphControl;
DEPENDENCY_PROPERTY_INITIALIZATION(EquationStylePanelControl, SelectedColor);
DEPENDENCY_PROPERTY_INITIALIZATION(EquationStylePanelControl, SelectedStyle);
DEPENDENCY_PROPERTY_INITIALIZATION(EquationStylePanelControl, EnableLineStylePicker);
DEPENDENCY_PROPERTY_INITIALIZATION(EquationStylePanelControl, SelectedColorIndex);
DEPENDENCY_PROPERTY_INITIALIZATION(EquationStylePanelControl, AvailableColors);
EquationStylePanelControl::EquationStylePanelControl()
@@ -69,8 +70,9 @@ void EquationStylePanelControl::ColorChooserLoaded(Object ^ sender, RoutedEventA
void EquationStylePanelControl::SelectColor(Color selectedColor)
{
for (auto item : ColorChooser->Items->GetView())
for (unsigned int i = 0; i < ColorChooser->Items->Size; i++)
{
auto item = ColorChooser->Items->GetAt(i);
auto brush = static_cast<SolidColorBrush ^>(item);
auto gridViewItem = dynamic_cast<GridViewItem ^>(ColorChooser->ContainerFromItem(brush));
@@ -82,6 +84,7 @@ void EquationStylePanelControl::SelectColor(Color selectedColor)
if (Utils::AreColorsEqual(brush->Color, selectedColor))
{
gridViewItem->IsSelected = true;
SelectedColorIndex = i;
return;
}
else