Skip to content

TextWrapping

Summary

Specifies whether text wraps when it reaches the edge of the containing box.

Signature

1
public enum TextWrapping

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
 using cAlgo.API;
 namespace cAlgo
 {
     // This sample indicator shows how to use TextWrapping property to manage the text wrap
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class TextWrappingSample : Indicator
     {
         [Parameter("Text", DefaultValue = "very long texttttttttttttttttttttt")]
         public string Text { get; set; }
         [Parameter("Wrapping", DefaultValue = TextWrapping.NoWrap)]
         public TextWrapping TextWrapping { get; set; }
         protected override void Initialize()
         {
             var stackPanel = new StackPanel
             {
                 BackgroundColor = Color.Gold,
                 HorizontalAlignment = HorizontalAlignment.Center,
                 VerticalAlignment = VerticalAlignment.Center,
                 Opacity = 0.6,
                 Width = 100
             };
             stackPanel.AddChild(new TextBlock
             {
                 Text = Text,
                 FontWeight = FontWeight.ExtraBold,
                 ForegroundColor = Color.Blue,
                 TextWrapping = TextWrapping
             });
             Chart.AddControl(stackPanel);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

Fields

WrapWithOverflow

Summary

Line-breaking occurs if the line overflows beyond the available block width. However, a line may overflow beyond the block width if the line breaking algorithm cannot determine a line break opportunity, as in the case of a very long word constrained in a fixed-width container with no scrolling allowed.

Signature

1
public static TextWrapping WrapWithOverflow;

Return Value

TextWrapping

NoWrap

Summary

No line wrapping is performed.

Signature

1
public static TextWrapping NoWrap;

Return Value

TextWrapping

Wrap

Summary

Line-breaking occurs if the line overflows beyond the available block width, even if the standard line breaking algorithm cannot determine any line break opportunity, as in the case of a very long word constrained in a fixed-width container with no scrolling allowed.

Signature

1
public static TextWrapping Wrap;

Return Value

TextWrapping