ITextParagraphFormat
ITextParagraphFormat
ITextParagraphFormat
ITextParagraphFormat
Interface
Definition
Defines the default paragraph formatting attributes of a document, or the current paragraph formatting attributes of a text range.
public : interface ITextParagraphFormatpublic interface ITextParagraphFormatPublic Interface ITextParagraphFormat// This API is not available in Javascript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Properties
Alignment Alignment Alignment Alignment
Gets or sets the paragraph alignment.
public : ParagraphAlignment Alignment { get; set; }public ParagraphAlignment Alignment { get; set; }Public ReadWrite Property Alignment As ParagraphAlignment// This API is not available in Javascript.
The paragraph alignment value.
FirstLineIndent FirstLineIndent FirstLineIndent FirstLineIndent
Gets the amount used to indent the first line of a paragraph relative to the left indent.
public : float FirstLineIndent { get; }public float FirstLineIndent { get; }Public ReadOnly Property FirstLineIndent As float// This API is not available in Javascript.
- Value
- float float float float
The first line indentation amount, in floating-point points.
Remarks
The left indent applies to all lines of the paragraph except the first line.
- See Also
KeepTogether KeepTogether KeepTogether KeepTogether
Gets or sets whether page breaks are allowed in paragraphs.
public : FormatEffect KeepTogether { get; set; }public FormatEffect KeepTogether { get; set; }Public ReadWrite Property KeepTogether As FormatEffect// This API is not available in Javascript.
A value that indicates whether page breaks are allowed.
KeepWithNext KeepWithNext KeepWithNext KeepWithNext
Gets or sets whether page breaks are allowed between paragraphs in a range.
public : FormatEffect KeepWithNext { get; set; }public FormatEffect KeepWithNext { get; set; }Public ReadWrite Property KeepWithNext As FormatEffect// This API is not available in Javascript.
The value that indicates whether page breaks are allowed.
LeftIndent LeftIndent LeftIndent LeftIndent
Gets the amount used to indent all lines except the first line of a paragraph.
public : float LeftIndent { get; }public float LeftIndent { get; }Public ReadOnly Property LeftIndent As float// This API is not available in Javascript.
- Value
- float float float float
The amount of left indentation, in floating-point points. Indentation is relative to the left margin.
- See Also
LineSpacing LineSpacing LineSpacing LineSpacing
Gets the paragraph line-spacing value.
public : float LineSpacing { get; }public float LineSpacing { get; }Public ReadOnly Property LineSpacing As float// This API is not available in Javascript.
- Value
- float float float float
The line spacing value. The meaning depends on the value of the LineSpacingRule property. The line spacing value is in floating-point points except when the line-spacing rule is Multiple or Percent.
- See Also
LineSpacingRule LineSpacingRule LineSpacingRule LineSpacingRule
Gets the paragraph line-spacing rule.
public : LineSpacingRule LineSpacingRule { get; }public LineSpacingRule LineSpacingRule { get; }Public ReadOnly Property LineSpacingRule As LineSpacingRule// This API is not available in Javascript.
The paragraph line-spacing rule.
- See Also
ListAlignment ListAlignment ListAlignment ListAlignment
Gets or sets the alignment to use for bulleted and numbered lists.
public : MarkerAlignment ListAlignment { get; set; }public MarkerAlignment ListAlignment { get; set; }Public ReadWrite Property ListAlignment As MarkerAlignment// This API is not available in Javascript.
The alignment for bulleted and numbered lists.
ListLevelIndex ListLevelIndex ListLevelIndex ListLevelIndex
Gets or sets the list level index used with paragraphs.
public : int ListLevelIndex { get; set; }public int ListLevelIndex { get; set; }Public ReadWrite Property ListLevelIndex As int// This API is not available in Javascript.
- Value
- int int int int
The list level index. It can be a value of 0 or higher, as described in the following table.
| Value | Meaning |
|---|---|
| 0 | No list. |
| 1 | First-level (outermost) list. |
| 2 | Second-level (nested) list. This is nested under a level 1 list item. |
| 3 | Third-level (nested) list. This is nested under a level 2 list item. |
| And so on | Nesting continues similarly. |
Up to three levels are common in HTML documents.
Remarks
Setting the list level index doesn't automatically change a list's indentation and other paragraph properties.
ListStart ListStart ListStart ListStart
Gets or sets the starting value or code of a list numbering sequence.
public : int ListStart { get; set; }public int ListStart { get; set; }Public ReadWrite Property ListStart As int// This API is not available in Javascript.
- Value
- int int int int
The starting value or code of a list numbering sequence.
ListStyle ListStyle ListStyle ListStyle
Gets or sets the style used to mark the item paragraphs in a list.
public : MarkerStyle ListStyle { get; set; }public MarkerStyle ListStyle { get; set; }Public ReadWrite Property ListStyle As MarkerStyle// This API is not available in Javascript.
The style used to mark the item paragraphs.
- See Also
ListTab ListTab ListTab ListTab
Gets or sets the list tab setting, which is the distance between the first indent and the start of the text on the first line.
public : float ListTab { get; set; }public float ListTab { get; set; }Public ReadWrite Property ListTab As float// This API is not available in Javascript.
- Value
- float float float float
The list tab setting.
Remarks
Numbered or bulleted text is left-justified, centered, or right-justified at the first-line indent value. Use ITextParagraphFormat.ListAlignment to determine the text position.
- See Also
ListType ListType ListType ListType
Gets or sets the kind of characters used to mark the item paragraphs in a list.
public : MarkerType ListType { get; set; }public MarkerType ListType { get; set; }Public ReadWrite Property ListType As MarkerType// This API is not available in Javascript.
The kind of characters used to mark the item paragraphs.
- See Also
NoLineNumber NoLineNumber NoLineNumber NoLineNumber
Gets or sets whether paragraph numbering is suppressed.
public : FormatEffect NoLineNumber { get; set; }public FormatEffect NoLineNumber { get; set; }Public ReadWrite Property NoLineNumber As FormatEffect// This API is not available in Javascript.
A value that indicates whether line numbering is suppressed.
Remarks
When the paragraphs are numbered, the number appears on the first line of the paragraph.
PageBreakBefore PageBreakBefore PageBreakBefore PageBreakBefore
Gets or sets whether there is a page break before a paragraph.
public : FormatEffect PageBreakBefore { get; set; }public FormatEffect PageBreakBefore { get; set; }Public ReadWrite Property PageBreakBefore As FormatEffect// This API is not available in Javascript.
A value that indicates whether there is page break.
RightIndent RightIndent RightIndent RightIndent
Gets or sets the right margin of a paragraph.
public : float RightIndent { get; set; }public float RightIndent { get; set; }Public ReadWrite Property RightIndent As float// This API is not available in Javascript.
- Value
- float float float float
The size of the right margin, in floating-point points.
- See Also
RightToLeft RightToLeft RightToLeft RightToLeft
Gets or sets whether the paragraph uses right-to-left formatting.
public : FormatEffect RightToLeft { get; set; }public FormatEffect RightToLeft { get; set; }Public ReadWrite Property RightToLeft As FormatEffect// This API is not available in Javascript.
A value that indicates whether the paragraph uses right-to-left formatting.
SpaceAfter SpaceAfter SpaceAfter SpaceAfter
Gets or sets the amount of vertical space that follows a paragraph.
public : float SpaceAfter { get; set; }public float SpaceAfter { get; set; }Public ReadWrite Property SpaceAfter As float// This API is not available in Javascript.
- Value
- float float float float
The amount of vertical space, in floating-point points.
- See Also
SpaceBefore SpaceBefore SpaceBefore SpaceBefore
Gets or sets the amount of vertical space above a paragraph.
public : float SpaceBefore { get; set; }public float SpaceBefore { get; set; }Public ReadWrite Property SpaceBefore As float// This API is not available in Javascript.
- Value
- float float float float
The amount of vertical space, in floating-point points.
- See Also
Style Style Style Style
Gets or sets the paragraph style.
public : ParagraphStyle Style { get; set; }public ParagraphStyle Style { get; set; }Public ReadWrite Property Style As ParagraphStyle// This API is not available in Javascript.
The paragraph style.
TabCount TabCount TabCount TabCount
Retrieves the tab count.
public : int TabCount { get; }public int TabCount { get; }Public ReadOnly Property TabCount As int// This API is not available in Javascript.
- Value
- int int int int
The tab count.
Remarks
The tab count of a new instance can be nonzero; for example, Microsoft Word stories begin with no explicit tabs defined, while rich edit instances start with a single explicit tab. To ensure there are no explicit tabs (that is, to set the tab count to zero), call the ITextParagraphFormat.ClearAllTabs method.
WidowControl WidowControl WidowControl WidowControl
Gets or sets whether widow and orphan suppression is on or off.
public : FormatEffect WidowControl { get; set; }public FormatEffect WidowControl { get; set; }Public ReadWrite Property WidowControl As FormatEffect// This API is not available in Javascript.
The state of window and orphan suppression.
Remarks
A widow is created when the last line of a paragraph is printed by itself at the top of a page. An orphan is when the first line of a paragraph is printed by itself at the bottom of a page.
- See Also
Methods
AddTab(Single, TabAlignment, TabLeader) AddTab(Single, TabAlignment, TabLeader) AddTab(Single, TabAlignment, TabLeader) AddTab(Single, TabAlignment, TabLeader)
Adds a new tab at the specified position.
public : void AddTab(float position, TabAlignment align, TabLeader leader)public void AddTab(Single position, TabAlignment align, TabLeader leader)Public Function AddTab(position As Single, align As TabAlignment, leader As TabLeader) As void// This API is not available in Javascript.
- position
- float Single Single Single
The position of the new tab, in floating-point points relative to the left side of the page for left-to-right paragraphs, or the right side of the page for right-to-left paragraphs. A maximum of 63 tabs are allowed. Tabs beyond the page are ignored. Negative tabs are not valid.
The alignment option for the tab position.
The character used to fill the space taken by a tab character.
ClearAllTabs() ClearAllTabs() ClearAllTabs() ClearAllTabs()
Clears all tabs, reverting to equally spaced tabs with the default tab spacing.
public : void ClearAllTabs()public void ClearAllTabs()Public Function ClearAllTabs() As void// This API is not available in Javascript.
DeleteTab(Single) DeleteTab(Single) DeleteTab(Single) DeleteTab(Single)
Deletes the tab at the specified position.
public : void DeleteTab(float position)public void DeleteTab(Single position)Public Function DeleteTab(position As Single) As void// This API is not available in Javascript.
- position
- float Single Single Single
The position of the tab to delete, in floating-point points.
GetClone() GetClone() GetClone() GetClone()
Creates a new object that is identical to this paragraph format object.
public : ITextParagraphFormat GetClone()public ITextParagraphFormat GetClone()Public Function GetClone() As ITextParagraphFormat// This API is not available in Javascript.
The duplicate paragraph format object.
- See Also
GetTab(Int32, Single, TabAlignment, TabLeader) GetTab(Int32, Single, TabAlignment, TabLeader) GetTab(Int32, Single, TabAlignment, TabLeader) GetTab(Int32, Single, TabAlignment, TabLeader)
Retrieves information about the specified tab.
public : void GetTab(int index, float position, TabAlignment align, TabLeader leader)public void GetTab(Int32 index, Single position, TabAlignment align, TabLeader leader)Public Function GetTab(index As Int32, position As Single, align As TabAlignment, leader As TabLeader) As void// This API is not available in Javascript.
- index
- int Int32 Int32 Int32
The zero-based index of the tab to retrieve.
- position
- float Single Single Single
The tab's position, in floating-point points. This parameter is zero if the tab does not exist.
The alignment option for the tab position.
The character used to fill the space taken by a tab character.
- See Also
IsEqual(ITextParagraphFormat) IsEqual(ITextParagraphFormat) IsEqual(ITextParagraphFormat) IsEqual(ITextParagraphFormat)
Determines whether this paragraph format object has the same properties as the specified paragraph format object.
public : PlatForm::Boolean IsEqual(ITextParagraphFormat format)public bool IsEqual(ITextParagraphFormat format)Public Function IsEqual(format As ITextParagraphFormat) As bool// This API is not available in Javascript.
The paragraph format object to compare against.
True if the objects have the same properties, or false if they don't.
SetClone(ITextParagraphFormat) SetClone(ITextParagraphFormat) SetClone(ITextParagraphFormat) SetClone(ITextParagraphFormat)
Sets the paragraph formatting by copying another paragraph formatting object.
public : void SetClone(ITextParagraphFormat format)public void SetClone(ITextParagraphFormat format)Public Function SetClone(format As ITextParagraphFormat) As void// This API is not available in Javascript.
The paragraph formatting to apply.
Remarks
Any paragraph formatting values that are undefined in value have no effect.
- See Also
SetIndents(Single, Single, Single) SetIndents(Single, Single, Single) SetIndents(Single, Single, Single) SetIndents(Single, Single, Single)
Sets the first-line indent, the left indent, and the right indent for a paragraph.
public : void SetIndents(float start, float left, float right)public void SetIndents(Single start, Single left, Single right)Public Function SetIndents(start As Single, left As Single, right As Single) As void// This API is not available in Javascript.
- start
- float Single Single Single
The indent of the first line in a paragraph, relative to the left indent. The value is in floating-point points and can be positive or negative.
- left
- float Single Single Single
The left indent of all lines except the first line in a paragraph, relative to the left margin. The value is in floating-point points and can be positive or negative.
- right
- float Single Single Single
The right indent of all lines in a paragraph, relative to the right margin. The value is in floating-point points and can be positive or negative. This value is optional.
Remarks
Line indents cannot position text in the margins. If the first-line indent is set to a negative value, for an outdented paragraph, while the left indent is zero, the first-line indent is reset to zero. To avoid this problem while retaining property sets, explicitly set the first-line indent value equal to zero, and then call SetIndents to set a nonnegative, left-indent value and set the desired first-line indent.
- See Also
SetLineSpacing(LineSpacingRule, Single) SetLineSpacing(LineSpacingRule, Single) SetLineSpacing(LineSpacingRule, Single) SetLineSpacing(LineSpacingRule, Single)
Sets the paragraph line-spacing rule and the amount of line spacing for a paragraph.
public : void SetLineSpacing(LineSpacingRule rule, float spacing)public void SetLineSpacing(LineSpacingRule rule, Single spacing)Public Function SetLineSpacing(rule As LineSpacingRule, spacing As Single) As void// This API is not available in Javascript.
The new line-spacing rule.
- spacing
- float Single Single Single
The new line spacing amount. If the line-spacing rule interprets the spacing value as a linear dimension, spacing is given in floating-point points.
Remarks
Because the line-spacing rule and line spacing work together, they must be set together.
- See Also