diff --git a/src/Calculator/App.xaml b/src/Calculator/App.xaml
index 68d6963..4930120 100644
--- a/src/Calculator/App.xaml
+++ b/src/Calculator/App.xaml
@@ -1885,11 +1885,6 @@
-
-
-
-
-
@@ -1917,17 +1912,13 @@
-
-
-
-
@@ -1947,7 +1938,6 @@
-
@@ -1974,18 +1964,15 @@
Background="{TemplateBinding EquationColor}"
Foreground="{StaticResource SystemChromeWhiteColor}"
BorderBrush="{TemplateBinding EquationColor}">
-
-
-
-
-
-
+
+
+
+
@@ -1995,9 +1982,7 @@
-
+
@@ -2005,8 +1990,6 @@
-
-
diff --git a/src/Calculator/Controls/EquationTextBox.cpp b/src/Calculator/Controls/EquationTextBox.cpp
index 102ff84..cc873ca 100644
--- a/src/Calculator/Controls/EquationTextBox.cpp
+++ b/src/Calculator/Controls/EquationTextBox.cpp
@@ -35,7 +35,6 @@ EquationTextBox::EquationTextBox()
void EquationTextBox::OnApplyTemplate()
{
m_equationButton = dynamic_cast(GetTemplateChild("EquationButton"));
- m_kgfEquationButton = dynamic_cast
-
-
-
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
+
+
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -360,6 +213,7 @@
FontWeight="Normal"
IsTextSelectionEnabled="False"
Text="{x:Bind ViewModel.AnalysisErrorString, Mode=OneWay}"
+ TextWrapping="Wrap"
Visibility="{x:Bind ViewModel.AnalysisErrorVisible, Mode=OneWay}"/>
diff --git a/src/Calculator/Views/GraphingCalculator/KeyGraphFeaturesPanel.xaml.cpp b/src/Calculator/Views/GraphingCalculator/KeyGraphFeaturesPanel.xaml.cpp
index 026e7e9..45e8959 100644
--- a/src/Calculator/Views/GraphingCalculator/KeyGraphFeaturesPanel.xaml.cpp
+++ b/src/Calculator/Views/GraphingCalculator/KeyGraphFeaturesPanel.xaml.cpp
@@ -16,22 +16,15 @@ using namespace Windows::UI::Xaml::Controls;
KeyGraphFeaturesPanel::KeyGraphFeaturesPanel()
{
InitializeComponent();
+ this->Loaded += ref new RoutedEventHandler(this, &KeyGraphFeaturesPanel::KeyGraphFeaturesPanel_Loaded);
}
-void KeyGraphFeaturesPanel::EquationButtonClicked(Object ^ sender, RoutedEventArgs ^ e)
+void KeyGraphFeaturesPanel::KeyGraphFeaturesPanel_Loaded(_In_ Platform::Object ^ sender, _In_ Windows::UI::Xaml::RoutedEventArgs ^ e)
+{
+ BackButton->Focus(::FocusState::Programmatic);
+}
+
+void KeyGraphFeaturesPanel::BackButton_Click(Object ^ sender, RoutedEventArgs ^ e)
{
KeyGraphFeaturesClosed(this, ref new RoutedEventArgs());
}
-
-void KeyGraphFeaturesPanel::EquationInputTextBox_Loaded(Object ^ sender, RoutedEventArgs ^ e)
-{
- if (ViewModel != nullptr)
- {
- SetEquationTextBoxProperties();
- }
-}
-
-void KeyGraphFeaturesPanel::SetEquationTextBoxProperties()
-{
- EquationInputTextBox->SetEquationText(ViewModel->Expression);
-}
diff --git a/src/Calculator/Views/GraphingCalculator/KeyGraphFeaturesPanel.xaml.h b/src/Calculator/Views/GraphingCalculator/KeyGraphFeaturesPanel.xaml.h
index df5e407..61fe317 100644
--- a/src/Calculator/Views/GraphingCalculator/KeyGraphFeaturesPanel.xaml.h
+++ b/src/Calculator/Views/GraphingCalculator/KeyGraphFeaturesPanel.xaml.h
@@ -18,31 +18,16 @@ public
KeyGraphFeaturesPanel();
OBSERVABLE_OBJECT();
+ OBSERVABLE_PROPERTY_RW(CalculatorApp::ViewModel::EquationViewModel ^, ViewModel);
public:
- property CalculatorApp::ViewModel::EquationViewModel ^ ViewModel
- {
- CalculatorApp::ViewModel::EquationViewModel ^ get()
- {
- return m_viewModel;
- }
- void set(CalculatorApp::ViewModel::EquationViewModel ^ value)
- {
- m_viewModel = value;
- RaisePropertyChanged(L"EquationViewModel");
- if (value != nullptr)
- {
- SetEquationTextBoxProperties();
- }
- }
- }
-
event Windows::UI::Xaml::RoutedEventHandler ^ KeyGraphFeaturesClosed;
+ static Windows::UI::Xaml::Media::SolidColorBrush
+ ^ ToSolidColorBrush(Windows::UI::Color color) { return ref new Windows::UI::Xaml::Media::SolidColorBrush(color); }
private:
- void EquationButtonClicked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
- void SetEquationTextBoxProperties();
- void EquationInputTextBox_Loaded(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
+ void KeyGraphFeaturesPanel_Loaded(_In_ Platform::Object ^ sender, _In_ Windows::UI::Xaml::RoutedEventArgs ^ e);
+ void BackButton_Click(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
private:
CalculatorApp::ViewModel::EquationViewModel ^ m_viewModel;