forked from microsoft/calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EquationStylePanelControl.xaml.h
40 lines (34 loc) · 2.1 KB
/
EquationStylePanelControl.xaml.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "EquationStylePanelControl.g.h"
#include "CalcViewModel/Common/Utils.h"
#include "CalcViewModel/Common/TraceLogger.h"
namespace CalculatorApp
{
[Windows::Foundation::Metadata::WebHostHidden] public ref class EquationStylePanelControl sealed
{
public:
EquationStylePanelControl();
DEPENDENCY_PROPERTY_OWNER(EquationStylePanelControl);
DEPENDENCY_PROPERTY_WITH_DEFAULT_AND_CALLBACK(Windows::UI::Color, SelectedColor, Windows::UI::Colors::Black);
DEPENDENCY_PROPERTY_WITH_DEFAULT_AND_CALLBACK(GraphControl::EquationLineStyle, SelectedStyle, GraphControl::EquationLineStyle::Solid);
DEPENDENCY_PROPERTY(int, SelectedColorIndex);
DEPENDENCY_PROPERTY_WITH_DEFAULT(Windows::Foundation::Collections::IVector<Windows::UI::Xaml::Media::SolidColorBrush ^> ^, AvailableColors, nullptr);
DEPENDENCY_PROPERTY(bool, EnableLineStylePicker);
static Windows::UI::Xaml::Media::DoubleCollection ^ GetLinePattern(Platform::Object ^ line);
static Platform::String ^ GetLineAutomationName(Platform::Object ^ line);
static Platform::String ^ GetColorAutomationName(Windows::UI::Xaml::Media::Brush ^ color);
private:
void SelectionChanged(Platform::Object ^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs ^ e);
void OnSelectedColorPropertyChanged(Windows::UI::Color oldColor, Windows::UI::Color newColor);
void ColorChooserLoaded(
Platform::Object ^ sender,
Windows::UI::Xaml::RoutedEventArgs ^ e);
void SelectColor(Windows::UI::Color selectedColor);
void OnSelectedStylePropertyChanged(GraphControl::EquationLineStyle oldStyle, GraphControl::EquationLineStyle newStyle);
void SelectStyle(GraphControl::EquationLineStyle selectedStyle);
void StyleChooserBox_SelectionChanged(Platform::Object ^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs ^ e);
void StyleChooserBox_Loaded(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
};
}