FizVizController/FizVizController/Views/ViewUtility.cs
/// <summary>
/// Helper function - given a ComboBox, set it up with a variety of default color options.
/// </summary>
/// <param name="comboBox"></param>
Helper function - given a ComboBox, set it up with a variety of default color options.
Helper function - given a ComboBox set it up with a variety of default color options .
public static void InitializeColorComboBox(ComboBox comboBox)
        {
            comboBox.DisplayMemberPath = "Key";
            comboBox.SelectedValuePath = "Value";
            comboBox.Items.Add(new KeyValuePair<string, Color>("Red", Color.FromArgb(255, 180, 0, 0)));
            comboBox.Items.Add(new KeyValuePair<string, Color>("Green", Color.FromArgb(255, 0, 180, 0)));
            comboBox.Items.Add(new KeyValuePair<string, Color>("Blue", Color.FromArgb(255, 0, 0, 180)));
            comboBox.Items.Add(new KeyValuePair<string, Color>("White", Color.FromArgb(255, 180, 180, 180)));
            comboBox.Items.Add(new KeyValuePair<string, Color>("Yellow", Color.FromArgb(255, 180, 180, 0)));
            comboBox.Items.Add(new KeyValuePair<string, Color>("Purple", Color.FromArgb(255, 180, 0, 180)));
            comboBox.Items.Add(new KeyValuePair<string, Color>("Teal", Color.FromArgb(255, 0, 180, 180)));
            comboBox.Items.Add(new KeyValuePair<string, Color>("Black", Color.FromArgb(255, 0, 0, 0)));
            comboBox.Items.Add(new KeyValuePair<string, Color>("Bright Yellow", Color.FromArgb(255, 255, 255, 0)));
            comboBox.Items.Add(new KeyValuePair<string, Color>("Bright Blue", Color.FromArgb(255, 0, 0, 255)));
            comboBox.Items.Add(new KeyValuePair<string, Color>("Bright Green", Color.FromArgb(255, 0, 255, 0)));
            comboBox.Items.Add(new KeyValuePair<string, Color>("Bright Red", Color.FromArgb(255, 255, 0, 0)));
            comboBox.Items.Add(new KeyValuePair<string, Color>("Dim Blue", Color.FromArgb(255, 0, 0, 90)));
            comboBox.Items.Add(new KeyValuePair<string, Color>("Dim Green", Color.FromArgb(255, 0, 90, 0)));
            comboBox.Items.Add(new KeyValuePair<string, Color>("Dim Red", Color.FromArgb(255, 90, 0, 0)));
        }
public static void InitializeColorComboBox ( ComboBox comboBox ) { comboBox . DisplayMemberPath = " " ; comboBox . SelectedValuePath = " " ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 180 , 0 , 0 ) ) ) ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 0 , 180 , 0 ) ) ) ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 0 , 0 , 180 ) ) ) ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 180 , 180 , 180 ) ) ) ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 180 , 180 , 0 ) ) ) ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 180 , 0 , 180 ) ) ) ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 0 , 180 , 180 ) ) ) ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 0 , 0 , 0 ) ) ) ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 255 , 255 , 0 ) ) ) ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 0 , 0 , 255 ) ) ) ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 0 , 255 , 0 ) ) ) ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 255 , 0 , 0 ) ) ) ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 0 , 0 , 90 ) ) ) ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 0 , 90 , 0 ) ) ) ; comboBox . Items . Add ( new KeyValuePair < string , Color > ( " " , Color . FromArgb ( 255 , 90 , 0 , 0 ) ) ) ; }
Helper function - given a ComboBox, set it up with a variety of default color options.
Helper function - given a ComboBox set it up with a variety of default color options .
comboBox
ComboBox
None