diff --git a/src/Calculator/EquationStylePanelControl.xaml.cs b/src/Calculator/EquationStylePanelControl.xaml.cs index f1f80f6ff..347e292d2 100644 --- a/src/Calculator/EquationStylePanelControl.xaml.cs +++ b/src/Calculator/EquationStylePanelControl.xaml.cs @@ -17,6 +17,13 @@ public sealed partial class EquationStylePanelControl : UserControl public EquationStylePanelControl() { InitializeComponent(); + + var allStyles = new List(); + allStyles.Add(EquationLineStyle.Solid); + allStyles.Add(EquationLineStyle.Dash); + allStyles.Add(EquationLineStyle.Dot); + + StyleChooserBox.ItemsSource = allStyles; } public Windows.UI.Color SelectedColor @@ -85,11 +92,11 @@ public static Windows.UI.Xaml.Media.DoubleCollection GetLinePattern(object line) switch (lineStyle) { case EquationLineStyle.Dot: - linePattern.Append(1); + linePattern.Add(1); break; case EquationLineStyle.Dash: - linePattern.Append(2); - linePattern.Append(1); + linePattern.Add(2); + linePattern.Add(1); break; default: break; @@ -285,7 +292,7 @@ private void SelectStyle(EquationLineStyle selectedStyle) var style = ((EquationLineStyle)item); var comboBoxItem = (StyleChooserBox.ContainerFromItem(style) as ComboBoxItem); - if (comboBoxItem != null) + if (comboBoxItem == null) { continue; }