mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 22:23:29 -07:00
fixes an issue around line style
This commit is contained in:
parent
e51064518f
commit
2f129487f6
1 changed files with 11 additions and 4 deletions
|
@ -17,6 +17,13 @@ namespace CalculatorApp
|
||||||
public EquationStylePanelControl()
|
public EquationStylePanelControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
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
|
public Windows.UI.Color SelectedColor
|
||||||
|
@ -85,11 +92,11 @@ namespace CalculatorApp
|
||||||
switch (lineStyle)
|
switch (lineStyle)
|
||||||
{
|
{
|
||||||
case EquationLineStyle.Dot:
|
case EquationLineStyle.Dot:
|
||||||
linePattern.Append(1);
|
linePattern.Add(1);
|
||||||
break;
|
break;
|
||||||
case EquationLineStyle.Dash:
|
case EquationLineStyle.Dash:
|
||||||
linePattern.Append(2);
|
linePattern.Add(2);
|
||||||
linePattern.Append(1);
|
linePattern.Add(1);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -285,7 +292,7 @@ namespace CalculatorApp
|
||||||
var style = ((EquationLineStyle)item);
|
var style = ((EquationLineStyle)item);
|
||||||
var comboBoxItem = (StyleChooserBox.ContainerFromItem(style) as ComboBoxItem);
|
var comboBoxItem = (StyleChooserBox.ContainerFromItem(style) as ComboBoxItem);
|
||||||
|
|
||||||
if (comboBoxItem != null)
|
if (comboBoxItem == null)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue