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:
@@ -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>
|
||||
|
@@ -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() }
|
||||
{
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user