Frame Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets a frame around the paragraph.
Syntax
public Frame Frame { get; set; }Public Property Frame As FrameMembers
| Value | Description |
|---|---|
| None | The paragraph has no frame. |
| LeftLine | The paragraph has a left frame line. |
| RightLine | The paragraph has a right frame line. |
| TopLine | The paragraph has a frame line at the top. |
| BottomLine | The paragraph has frame line at the bottom. |
| Box | The paragraph has a complete frame. |
| MergedBox | The paragraph has a complete frame. If the following or the previous paragraph also has a frame, the frames are merged to a single frame. |
Examples
The following example applies paragraph layout to selected report text by using ParagraphFormat.Frame.
textControl.Text = "First item\nSecond item\nThird item";
textControl.Select(0, textControl.Text.Length);
ParagraphFormat paragraphFormat = textControl.Selection.ParagraphFormat;
paragraphFormat.Frame = Frame.LeftLine;
Console.WriteLine($"Frame used by Paragraph Format: {paragraphFormat.Frame}");
textControl.Selection.ParagraphFormat = paragraphFormat;textControl.Text = "First item" & vbCrLf & "Second item" & vbCrLf & "Third item"
textControl.Select(0, textControl.Text.Length)
Dim paragraphFormat As ParagraphFormat = textControl.Selection.ParagraphFormat
paragraphFormat.Frame = Frame.LeftLine
Console.WriteLine($"Frame used by Paragraph Format: {paragraphFormat.Frame}")
textControl.Selection.ParagraphFormat = paragraphFormatRemarks
The property's default value is Frame.None.
The property returns its default value when the text selection contains multiple paragraphs with mixed frames. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.