Input for WinForms | ComponentOne
C1.Win.Input Namespace / C1CheckBox Class / IndeterminateIcon Property
Example

In This Topic
    IndeterminateIcon Property
    In This Topic
    Gets or sets a custom C1.Framework.C1Icon for the System.Windows.Forms.CheckState.Indeterminate checkbox state.
    Syntax
    'Declaration
     
    
    Public Property IndeterminateIcon As C1Icon
    public C1Icon IndeterminateIcon {get; set;}
    Remarks
    Use the FrontIcon key for the front icon, this key applies the ForeColor to this icon. Use the BorderIcon key for the border icon, this key applies the BorderColor to this icon. Use the BackIcon key for the back icon, this key applies the BackColor to this icon.
    Example
    public static C1Icon Indeterminate
    {
        get
        {
            var mainIcon = new C1CompositeIcon();
            var markIcon = new C1PathIcon
            {
                ViewBox = new Rectangle(0, 0, 20, 20),
                Data = "M6.50195 10.498C6.43164 10.498 6.36523 10.4863 6.30273 10.4629C6.24414 10.4355 6.19141 10.4004 6.14453 10.3574C6.10156 10.3105 6.06641 10.2578 6.03906 10.1992C6.01172 10.1367 5.99805 10.0703 5.99805 10C5.99805 9.92969 6.01172 9.86523 6.03906 9.80664C6.06641 9.74414 6.10156 9.69141 6.14453 9.64844C6.19141 9.60156 6.24414 9.56641 6.30273 9.54297C6.36523 9.51562 6.43164 9.50195 6.50195 9.50195H13.498C13.5684 9.50195 13.6328 9.51562 13.6914 9.54297C13.7539 9.56641 13.8066 9.60156 13.8496 9.64844C13.8965 9.69141 13.9336 9.74414 13.9609 9.80664C13.9883 9.86523 14.002 9.92969 14.002 10C14.002 10.0703 13.9883 10.1367 13.9609 10.1992C13.9336 10.2578 13.8965 10.3105 13.8496 10.3574C13.8066 10.4004 13.7539 10.4355 13.6914 10.4629C13.6328 10.4863 13.5684 10.498 13.498 10.498H6.50195Z",//"m 5 12 L 5 10 L 16 10 L 16 12 z",//"m 5 11 L 5 9 L 15 9 L 15 11 z",
                AllowSmoothing = false,
                Key = "FrontIcon"
            };
            var backIcon = new C1PathIcon
            {
                ViewBox = new Rectangle(0, 0, 20, 20),
                Data = "M 4 1 C 2.5 1 1 2.5 1 4 V 16 C 1 17.5 2.5 19 4 19 H 16 C 17.5 19 19 17.5 19 16 V 4 C 19 2.5 17.5 1 16 1 H 4 Z",
                Key = "BackIcon"
            };
            var borderIcon = new C1PathIcon
            {
                ViewBox = new Rectangle(0, 0, 20, 20),
                Data = "M4 0.5C2.067 0.5 0.5 2.067 0.5 4V16C0.5 17.933 2.067 19.5 4 19.5H16C17.933 19.5 19.5 17.933 19.5 16V4C19.5 2.067 17.933 0.5 16 0.5H4Z",
                Key = "BorderIcon"
            };
            mainIcon.Icons.Add(borderIcon);
            mainIcon.Icons.Add(backIcon);
            mainIcon.Icons.Add(markIcon);
            mainIcon.Size = new Size(20, 20);
            return mainIcon;
        }
    }
        c1CheckBox.IndeterminateIcon = Indeterminate;
        
        c1CheckBox.Styles.Normal.Glyph.Checked.Default.BackColor = Color.FromArgb(0, 95, 184);
        c1CheckBox.Styles.Normal.Glyph.Checked.Default.ForeColor = Color.White;
        c1CheckBox.Styles.Normal.Glyph.Checked.Default.BorderColor = Color.FromArgb(0, 95, 184);
        c1CheckBox.Styles.Normal.Glyph.Checked.Hot.BackColor = Color.FromArgb(26, 111, 191);
        c1CheckBox.Styles.Normal.Glyph.Checked.Hot.ForeColor = Color.White;
        c1CheckBox.Styles.Normal.Glyph.Checked.Hot.BorderColor = Color.FromArgb(26, 111, 191);
        c1CheckBox.Styles.Normal.Glyph.Checked.Pressed.BackColor = Color.FromArgb(51, 127, 198);
        c1CheckBox.Styles.Normal.Glyph.Checked.Pressed.ForeColor = Color.FromArgb(194, 217, 238);
        c1CheckBox.Styles.Normal.Glyph.Checked.Pressed.BorderColor = Color.FromArgb(51, 127, 198);
        c1CheckBox.Styles.Normal.Glyph.Checked.HotPressed.BackColor = Color.FromArgb(51, 127, 198);
        c1CheckBox.Styles.Normal.Glyph.Checked.HotPressed.ForeColor = Color.FromArgb(194, 217, 238);
        c1CheckBox.Styles.Normal.Glyph.Checked.HotPressed.BorderColor = Color.FromArgb(51, 127, 198);
        c1CheckBox.Styles.Normal.Glyph.Checked.Disabled.BackColor = Color.FromArgb(200, 200, 200);
        c1CheckBox.Styles.Normal.Glyph.Checked.Disabled.ForeColor = Color.FromArgb(255, 255, 255);
        c1CheckBox.Styles.Normal.Glyph.Checked.Disabled.BorderColor = Color.FromArgb(200, 200, 200);
    See Also