Remove EquationTextBox from KeyGraphFeaturesPanel (#833)
* remove EquationBox from KFG * polish * improve templates * fix issue with dark theme and MathRichEditBox
This commit is contained in:
		
				
					committed by
					
						 Dave Grochocki
						Dave Grochocki
					
				
			
			
				
	
			
			
			
						parent
						
							fe599e31f8
						
					
				
				
					commit
					dc79ec65f6
				
			| @@ -35,7 +35,6 @@ EquationTextBox::EquationTextBox() | ||||
| void EquationTextBox::OnApplyTemplate() | ||||
| { | ||||
|     m_equationButton = dynamic_cast<ToggleButton ^>(GetTemplateChild("EquationButton")); | ||||
|     m_kgfEquationButton = dynamic_cast<Button ^>(GetTemplateChild("KGFEquationButton")); | ||||
|     m_richEditBox = dynamic_cast<MathRichEditBox ^>(GetTemplateChild("MathRichEditBox")); | ||||
|     m_deleteButton = dynamic_cast<Button ^>(GetTemplateChild("DeleteButton")); | ||||
|     m_removeButton = dynamic_cast<Button ^>(GetTemplateChild("RemoveButton")); | ||||
| @@ -74,11 +73,6 @@ void EquationTextBox::OnApplyTemplate() | ||||
|         m_richEditContextMenu->Opening += ref new EventHandler<Platform::Object ^>(this, &EquationTextBox::OnRichEditMenuOpening); | ||||
|     } | ||||
|  | ||||
|     if (m_kgfEquationButton != nullptr) | ||||
|     { | ||||
|         m_kgfEquationButton->Click += ref new RoutedEventHandler(this, &EquationTextBox::OnKGFEquationButtonClicked); | ||||
|     } | ||||
|  | ||||
|     if (m_deleteButton != nullptr) | ||||
|     { | ||||
|         m_deleteButton->Click += ref new RoutedEventHandler(this, &EquationTextBox::OnDeleteButtonClicked); | ||||
| @@ -208,11 +202,6 @@ void EquationTextBox::OnEquationButtonClicked(Object ^ sender, RoutedEventArgs ^ | ||||
|     AutomationProperties::SetName(m_equationButton, equationButtonMessage); | ||||
| } | ||||
|  | ||||
| void EquationTextBox::OnKGFEquationButtonClicked(Object ^ sender, RoutedEventArgs ^ e) | ||||
| { | ||||
|     EquationButtonClicked(this, ref new RoutedEventArgs()); | ||||
| } | ||||
|  | ||||
| void EquationTextBox::OnRemoveButtonClicked(Object ^ sender, RoutedEventArgs ^ e) | ||||
| { | ||||
|     if (IsAddEquationMode) | ||||
| @@ -350,7 +339,7 @@ bool EquationTextBox::RichEditHasContent() | ||||
|     { | ||||
|         text = m_richEditBox->MathText; | ||||
|     } | ||||
|     return (!text->IsEmpty() && m_HasFocus); | ||||
|     return !text->IsEmpty() && m_HasFocus; | ||||
| } | ||||
|  | ||||
| void EquationTextBox::OnRichEditMenuOpening(Object ^ /*sender*/, Object ^ /*args*/) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user