mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
fixes an issue around line style (#1575)
This commit is contained in:
parent
3ab348aeb5
commit
6196c89da7
1 changed files with 11 additions and 4 deletions
|
@ -17,6 +17,13 @@ namespace CalculatorApp
|
|||
public EquationStylePanelControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
var allStyles = new List<EquationLineStyle>();
|
||||
allStyles.Add(EquationLineStyle.Solid);
|
||||
allStyles.Add(EquationLineStyle.Dash);
|
||||
allStyles.Add(EquationLineStyle.Dot);
|
||||
|
||||
StyleChooserBox.ItemsSource = allStyles;
|
||||
}
|
||||
|
||||
public Windows.UI.Color SelectedColor
|
||||
|
@ -85,11 +92,11 @@ namespace CalculatorApp
|
|||
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 @@ namespace CalculatorApp
|
|||
var style = ((EquationLineStyle)item);
|
||||
var comboBoxItem = (StyleChooserBox.ContainerFromItem(style) as ComboBoxItem);
|
||||
|
||||
if (comboBoxItem != null)
|
||||
if (comboBoxItem == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue