ChildEducationSoftwareGUI.MainWindow.cboBrushSize_SelectionChanged C# (CSharp) Method

cboBrushSize_SelectionChanged() private method

private cboBrushSize_SelectionChanged ( object sender, System.Windows.Controls.SelectionChangedEventArgs e ) : void
sender object
e System.Windows.Controls.SelectionChangedEventArgs
return void
        private void cboBrushSize_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (cboBrushSize.Items.Count > 0 && ((ComboBoxItem)cboBrushSize.SelectedItem).Content != null)
            {
                if (((ComboBoxItem)cboBrushSize.SelectedItem).Content.ToString() == "2")
                {
                    drawingPane.DefaultDrawingAttributes.Width = 2;
                    drawingPane.DefaultDrawingAttributes.Height = 2;
                }
                else if (((ComboBoxItem)cboBrushSize.SelectedItem).Content.ToString() == "1")
                {
                    drawingPane.DefaultDrawingAttributes.Width = 1;
                    drawingPane.DefaultDrawingAttributes.Height = 1;
                }
                else if (((ComboBoxItem)cboBrushSize.SelectedItem).Content.ToString() == "4")
                {
                    drawingPane.DefaultDrawingAttributes.Width = 4;
                    drawingPane.DefaultDrawingAttributes.Height = 4;
                }
                else if (((ComboBoxItem)cboBrushSize.SelectedItem).Content.ToString() == "6")
                {
                    drawingPane.DefaultDrawingAttributes.Width = 6;
                    drawingPane.DefaultDrawingAttributes.Height = 6;
                }
                else if (((ComboBoxItem)cboBrushSize.SelectedItem).Content.ToString() == "8")
                {
                    drawingPane.DefaultDrawingAttributes.Width = 8;
                    drawingPane.DefaultDrawingAttributes.Height = 8;
                }
                else if (((ComboBoxItem)cboBrushSize.SelectedItem).Content.ToString() == "10")
                {
                    drawingPane.DefaultDrawingAttributes.Width = 10;
                    drawingPane.DefaultDrawingAttributes.Height = 10;
                }

            }
        }