Skip to content

CharacterCasing

Summary

Specifies the case of characters typed manually into a TextBox control.

Signature

1
public enum CharacterCasing

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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
 using cAlgo.API;
 namespace cAlgo
 {
     // This indicator shows how to use CharacterCasing on text box controls
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class CharacterCasingSample : Indicator
     {
         protected override void Initialize()
         {
             var stackPanel = new StackPanel
             {
                 HorizontalAlignment = HorizontalAlignment.Center,
                 VerticalAlignment = VerticalAlignment.Center,
                 BackgroundColor = Color.Gold,
                 Opacity = 0.6,
                 Width = 200
             };
             stackPanel.AddChild(new TextBlock
             {
                 Text = "Lower Character Casing",
                 Margin = new Thickness(10, 10, 10, 0),
                 ForegroundColor = Color.Red,
                 FontWeight = FontWeight.ExtraBold
             });
             stackPanel.AddChild(new TextBox
             {
                 CharacterCasing = CharacterCasing.Lower,
                 Margin = 10
             });
             stackPanel.AddChild(new TextBlock
             {
                 Text = "Upper Character Casing",
                 Margin = new Thickness(10, 10, 10, 0),
                 ForegroundColor = Color.Red,
                 FontWeight = FontWeight.ExtraBold
             });
             stackPanel.AddChild(new TextBox
             {
                 CharacterCasing = CharacterCasing.Upper,
                 Margin = 10
             });
             stackPanel.AddChild(new TextBlock
             {
                 Text = "Normal Character Casing",
                 Margin = new Thickness(10, 10, 10, 0),
                 ForegroundColor = Color.Red,
                 FontWeight = FontWeight.ExtraBold
             });
             stackPanel.AddChild(new TextBox
             {
                 CharacterCasing = CharacterCasing.Normal,
                 Margin = 10
             });
             Chart.AddControl(stackPanel);
         }
         public override void Calculate(int index)
         {
         }
     }
 }
 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
 import clr
 clr.AddReference("cAlgo.API")
 from cAlgo.API import *
 class Test():
     def get_text_block(self, text):
         textBlock = TextBlock()
         textBlock.Text = text
         textBlock.ForegroundColor = Color.Red
         textBlock.FontWeight = FontWeight.ExtraBold
         textBlock.Margin = Thickness(10, 10, 10, 0)
         return textBlock
     def get_text_box(self, characterCasing):
         textBox = TextBox()
         textBox.CharacterCasing = characterCasing
         textBox.Margin = Thickness(10)
         return textBox
     def initialize(self):
         stackPanel = StackPanel()
         stackPanel.HorizontalAlignment = HorizontalAlignment.Center
         stackPanel.VerticalAlignment = VerticalAlignment.Center
         stackPanel.BackgroundColor = Color.Gold
         stackPanel.Opacity = 0.6
         stackPanel.Width = 200
         stackPanel.AddChild(self.get_text_block("Lower Character Casing"))
         stackPanel.AddChild(self.get_text_box(CharacterCasing.Lower))
         stackPanel.AddChild(self.get_text_block("Upper Character Casing"))
         stackPanel.AddChild(self.get_text_box(CharacterCasing.Upper))
         stackPanel.AddChild(self.get_text_block("Normal Character Casing"))
         stackPanel.AddChild(self.get_text_box(CharacterCasing.Normal))
         api.Chart.AddControl(stackPanel)

Fields

Normal

Summary

Characters typed into a TextBox are not converted.

Signature

1
CharacterCasing.Normal;

Return Value

CharacterCasing

Lower

Summary

Characters typed into a TextBox are converted to lowercase.

Signature

1
CharacterCasing.Lower;

Return Value

CharacterCasing

Upper

Summary

Characters typed into a TextBox are converted to uppercase.

Signature

1
CharacterCasing.Upper;

Return Value

CharacterCasing