Skip to content

CheckBox

Summary

Represents the Checkbox.

Signature

1
public class CheckBox : Control

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 using cAlgo.API;
 namespace cAlgo
 {
     // This sample shows how to use checkbox control and handle its checked/unchecked events
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class CheckBoxControlSample : Indicator
     {
         protected override void Initialize()
         {
             var stackPanel = new StackPanel
             {
                 HorizontalAlignment = HorizontalAlignment.Center,
                 VerticalAlignment = VerticalAlignment.Center,
                 BackgroundColor = Color.Gold
             };
             var checkBox = new CheckBox
             {
                 Text = "Unchecked",
                 Margin = 10,
                 FontWeight = FontWeight.ExtraBold
             };
             checkBox.Checked += CheckBox_Checked;
             checkBox.Unchecked += CheckBox_Unchecked;
             stackPanel.AddChild(checkBox);
             Chart.AddControl(stackPanel);
         }
         private void CheckBox_Unchecked(CheckBoxEventArgs obj)
         {
             obj.CheckBox.Text = "Unchecked";
         }
         private void CheckBox_Checked(CheckBoxEventArgs obj)
         {
             obj.CheckBox.Text = "Checked";
         }
         public override void Calculate(int index)
         {
         }
     }
 }

See Also

Properties

IsThreeState

Summary

Checks if the checkbox may be of three states - checked, unchecked and indeterminate.

Signature

1
public bool IsThreeState {get; set;}

Return Value

bool

IsChecked

Summary

Gets or sets a value indicating whether the checkbox is checked.

Signature

1
public bool? IsChecked {get; set;}

Return Value

bool?

Text

Summary

Gets or sets the checkbox text.

Signature

1
public string Text {get; set;}

Return Value

string

Content

Summary

Gets or sets the content.

Signature

1
public ControlBase Content {get; set;}

Return Value

ControlBase

Events

Click

Summary

Occurs when clicked.

Signature

1
public event Action<CheckBoxEventArgs> Click;

Checked

Summary

Occurs when checked.

Signature

1
public event Action<CheckBoxEventArgs> Checked;

Unchecked

Summary

Occurs when unchecked.

Signature

1
public event Action<CheckBoxEventArgs> Unchecked;

Indeterminate

Summary

Occurs when indeterminate.

Signature

1
public event Action<CheckBoxEventArgs> Indeterminate;