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:
Stephanie Anderl
2019-11-21 15:07:45 -08:00
committed by GitHub
parent 288a90e0fe
commit a33c1a4494
19 changed files with 288 additions and 68 deletions

View File

@@ -448,4 +448,4 @@
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Microsoft.UI.Xaml.2.0.181018003.1\build\native\Microsoft.UI.Xaml.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.UI.Xaml.2.0.181018003.1\build\native\Microsoft.UI.Xaml.targets'))" />
</Target>
</Project>
</Project>

View File

@@ -34,6 +34,7 @@ namespace CalculatorApp::ViewModel
EquationViewModel::EquationViewModel(GraphControl::Equation ^ equation)
: m_AnalysisErrorVisible{ false }
, m_FunctionLabelIndex{ 0 }
, m_KeyGraphFeaturesItems{ ref new Vector<KeyGraphFeaturesItem ^>() }
, m_resourceLoader{ Windows::ApplicationModel::Resources::ResourceLoader::GetForCurrentView() }
{

View File

@@ -40,6 +40,7 @@ public
OBSERVABLE_OBJECT();
OBSERVABLE_PROPERTY_R(GraphControl::Equation ^, GraphEquation);
OBSERVABLE_PROPERTY_RW(int, FunctionLabelIndex);
property Platform::String ^ Expression
{
@@ -73,6 +74,22 @@ public
}
}
property bool IsLineEnabled
{
bool get()
{
return GraphEquation->IsLineEnabled;
}
void set(bool value)
{
if (GraphEquation->IsLineEnabled != value)
{
GraphEquation->IsLineEnabled = value;
RaisePropertyChanged("IsLineEnabled");
}
}
}
// Key Graph Features
OBSERVABLE_PROPERTY_R(Platform::String ^, AnalysisErrorString);
OBSERVABLE_PROPERTY_R(bool, AnalysisErrorVisible);