Equation button updates: Enable/Disable on click, button content f1, f2, f3..., visibility icon on hover (#804)
* Added enable/disable line functionality * Update EquationTextBox to change the opacity of functions have are not visible. Update the function label for the EquationTextBox to increment the label to show f1, f2, f3, etc * rebase key-graph-features and fix issue where removing an equation box and adding a new one repopulates the previous equation * Added visibility icon for the equation button hover * updated EquationButton to be a toggle button to better handle the LineHidden state and other PR comment fixes. * Updated EquationButton style to use a toggle button and to have placeholder icons for the show/hide states * Updated equation button after pulling the refactor work into the branch. Fixed the Equation Button in KGF UI * Fixed Pepe's bugs * Uncomment temporary.pfx in calculator.vcxproj
This commit is contained in:
		| @@ -21,10 +21,12 @@ using namespace Windows::UI::Xaml::Controls::Primitives; | ||||
|  | ||||
| DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, EquationColor); | ||||
| DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, ColorChooserFlyout); | ||||
| DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, EquationButtonContentIndex); | ||||
|  | ||||
|  | ||||
| void EquationTextBox::OnApplyTemplate() | ||||
| { | ||||
|     m_equationButton = dynamic_cast<Button ^>(GetTemplateChild("EquationButton")); | ||||
|     m_equationButton = dynamic_cast<ToggleButton ^>(GetTemplateChild("EquationButton")); | ||||
|     m_richEditBox = dynamic_cast<MathRichEditBox ^>(GetTemplateChild("EquationTextBox")); | ||||
|     m_deleteButton = dynamic_cast<Button ^>(GetTemplateChild("DeleteButton")); | ||||
|     m_removeButton = dynamic_cast<Button ^>(GetTemplateChild("RemoveButton")); | ||||
| @@ -187,6 +189,13 @@ void EquationTextBox::OnRemoveButtonClicked(Object ^ sender, RoutedEventArgs ^ e | ||||
|     { | ||||
|         m_functionButton->IsEnabled = false; | ||||
|     } | ||||
|  | ||||
|     if (m_equationButton) | ||||
|     { | ||||
|         m_equationButton->IsChecked = false; | ||||
|     } | ||||
|  | ||||
|     VisualStateManager::GoToState(this, "Normal", true); | ||||
| } | ||||
|  | ||||
| void EquationTextBox::OnColorChooserButtonClicked(Object ^ sender, RoutedEventArgs ^ e) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user