FrameStyle Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets the style of the paragraph's frame.
Syntax
public FrameStyle FrameStyle { get; set; }Public Property FrameStyle As FrameStyleMembers
| Value | Description |
|---|---|
| Single | The paragraph's frame is drawn with a single line. |
| Double | The paragraph's frame is drawn with a doubled line. |
Examples
The following example applies paragraph layout to selected report text by using ParagraphFormat.FrameStyle.
textControl.Text = "First item\nSecond item\nThird item";
textControl.Select(0, textControl.Text.Length);
ParagraphFormat paragraphFormat = textControl.Selection.ParagraphFormat;
paragraphFormat.FrameStyle = TXTextControl.FrameStyle.Single;
Console.WriteLine($"Frame Style used by Paragraph Format: {paragraphFormat.FrameStyle}");
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.FrameStyle = TXTextControl.FrameStyle.Single
Console.WriteLine($"Frame Style used by Paragraph Format: {paragraphFormat.FrameStyle}")
textControl.Selection.ParagraphFormat = paragraphFormatRemarks
The property's default value is FrameStyle.Single.
The property returns its default value when the text selection contains multiple paragraphs with mixed style. The Selection.IsCommonValueSelected method can be used to check for mixed attributes.