Summary
Represents the radio button actions.
Signature
| public class RadioButtonEventArgs
|
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
40
41 | using cAlgo.API;
namespace cAlgo
{
// This example shows how to use the RadioButtonEventArgs
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class RadioButtonEventArgsSample : Indicator
{
protected override void Initialize()
{
var firstRadioButton = new RadioButton
{
Text = "First Radio Button"
};
firstRadioButton.Checked += RadioButton_Changed;
firstRadioButton.Unchecked += RadioButton_Changed;
var secondRadioButton = new RadioButton
{
Text = "Second Radio Button"
};
secondRadioButton.Checked += RadioButton_Changed;
secondRadioButton.Unchecked += RadioButton_Changed;
var panel = new StackPanel
{
Orientation = Orientation.Vertical,
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center,
};
panel.AddChild(firstRadioButton);
panel.AddChild(secondRadioButton);
Chart.AddControl(panel);
}
private void RadioButton_Changed(RadioButtonEventArgs obj)
{
var state = obj.RadioButton.IsChecked ? "Checked" : "Unchecked";
obj.RadioButton.Text = state;
}
public override void Calculate(int index)
{
}
}
}
|
See Also
Properties
Summary
Gets the radiobutton data.
Signature
| public RadioButton RadioButton {get;}
|
Return Value
RadioButton
Related Tutorials