Show / Hide Table of Contents

Class FlowDocumentTextFormatExtensions

Fluent type extensions for manipulating FlowDocument objects focused on text element formatting.

Inheritance
object
FlowDocumentTextFormatExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TheXDS.MCART.Types.Extensions
Assembly: MCART.Wpf.FlowDocumentExtensions.dll
Syntax
public static class FlowDocumentTextFormatExtensions

Methods

| Edit this page View Source

Background<TElement>(TElement, Brush)

Sets a background color for a TextElement.

Declaration
public static TElement Background<TElement>(this TElement element, Brush value) where TElement : TextElement
Parameters
Type Name Description
TElement element

TextElement to which the background color will be applied.

Brush value

Background to apply.

Returns
Type Description
TElement

element, allowing this function to be used with Fluent syntax.

Type Parameters
Name Description
TElement

Type of TextElement to which the background color will be applied.

| Edit this page View Source

Bold<TElement>(TElement)

Sets the text format to bold.

Declaration
public static TElement Bold<TElement>(this TElement element) where TElement : TextElement
Parameters
Type Name Description
TElement element

TextElement to manipulate.

Returns
Type Description
TElement

element, allowing this function to be used with Fluent syntax.

Type Parameters
Name Description
TElement

Type of TextElement to manipulate.

| Edit this page View Source

Center<TElement>(TElement)

Sets the text alignment to center.

Declaration
public static TElement Center<TElement>(this TElement element) where TElement : Block
Parameters
Type Name Description
TElement element

TextElement to manipulate.

Returns
Type Description
TElement

element, allowing this function to be used with Fluent syntax.

Type Parameters
Name Description
TElement

Type of TextElement to manipulate.

| Edit this page View Source

Effect<TElement>(TElement, TextEffect)

Sets a text effect on a TextElement.

Declaration
public static TElement Effect<TElement>(this TElement element, TextEffect effect) where TElement : TextElement
Parameters
Type Name Description
TElement element

TextElement to manipulate.

TextEffect effect

Effect to apply to the text.

Returns
Type Description
TElement

element, allowing this function to be used with Fluent syntax.

Type Parameters
Name Description
TElement

Type of TextElement to manipulate.

| Edit this page View Source

Foreground<TElement>(TElement, Brush)

Sets a foreground color for a TextElement.

Declaration
public static TElement Foreground<TElement>(this TElement element, Brush value) where TElement : TextElement
Parameters
Type Name Description
TElement element

TextElement to which the foreground color will be applied.

Brush value

Foreground color to apply.

Returns
Type Description
TElement

element, allowing this function to be used with Fluent syntax.

Type Parameters
Name Description
TElement

Type of TextElement to which the foreground color will be applied.

| Edit this page View Source

Format<TElement>(TElement, double)

Sets the format of a TextElement.

Declaration
public static TElement Format<TElement>(this TElement element, double fontSize) where TElement : TextElement
Parameters
Type Name Description
TElement element

TextElement to manipulate.

double fontSize

Font size.

Returns
Type Description
TElement

element, allowing this function to be used with Fluent syntax.

Type Parameters
Name Description
TElement

Type of TextElement to manipulate.

| Edit this page View Source

Format<TElement>(TElement, FontStretch)

Sets the format of a TextElement.

Declaration
public static TElement Format<TElement>(this TElement element, FontStretch fontStretch) where TElement : TextElement
Parameters
Type Name Description
TElement element

TextElement to manipulate.

FontStretch fontStretch

Font stretch.

Returns
Type Description
TElement

element, allowing this function to be used with Fluent syntax.

Type Parameters
Name Description
TElement

Type of TextElement to manipulate.

| Edit this page View Source

Format<TElement>(TElement, FontStyle)

Sets the format of a TextElement.

Declaration
public static TElement Format<TElement>(this TElement element, FontStyle fontStyle) where TElement : TextElement
Parameters
Type Name Description
TElement element

TextElement to manipulate.

FontStyle fontStyle

Font style.

Returns
Type Description
TElement

element, allowing this function to be used with Fluent syntax.

Type Parameters
Name Description
TElement

Type of TextElement to manipulate.

| Edit this page View Source

Format<TElement>(TElement, FontWeight)

Sets the format of a TextElement.

Declaration
public static TElement Format<TElement>(this TElement element, FontWeight fontWeight) where TElement : TextElement
Parameters
Type Name Description
TElement element

TextElement to manipulate.

FontWeight fontWeight

Font weight.

Returns
Type Description
TElement

element, allowing this function to be used with Fluent syntax.

Type Parameters
Name Description
TElement

Type of TextElement to manipulate.

| Edit this page View Source

Format<TElement>(TElement, FontFamily)

Sets the format of a TextElement.

Declaration
public static TElement Format<TElement>(this TElement element, FontFamily fontFamily) where TElement : TextElement
Parameters
Type Name Description
TElement element

TextElement to manipulate.

FontFamily fontFamily

Font family to use.

Returns
Type Description
TElement

element, allowing this function to be used with Fluent syntax.

Type Parameters
Name Description
TElement

Type of TextElement to manipulate.

| Edit this page View Source

Format<TElement>(TElement, TextAlignment)

Sets the format of a TextElement.

Declaration
public static TElement Format<TElement>(this TElement element, TextAlignment alignment) where TElement : Block
Parameters
Type Name Description
TElement element

TextElement to manipulate.

TextAlignment alignment

Text alignment.

Returns
Type Description
TElement

element, allowing this function to be used with Fluent syntax.

Type Parameters
Name Description
TElement

Type of TextElement to manipulate.

| Edit this page View Source

Justify<TElement>(TElement)

Sets the text alignment to justified.

Declaration
public static TElement Justify<TElement>(this TElement element) where TElement : Block
Parameters
Type Name Description
TElement element

TextElement to manipulate.

Returns
Type Description
TElement

element, allowing this function to be used with Fluent syntax.

Type Parameters
Name Description
TElement

Type of TextElement to manipulate.

| Edit this page View Source

Left<TElement>(TElement)

Sets the text alignment to left.

Declaration
public static TElement Left<TElement>(this TElement element) where TElement : Block
Parameters
Type Name Description
TElement element

TextElement to manipulate.

Returns
Type Description
TElement

element, allowing this function to be used with Fluent syntax.

Type Parameters
Name Description
TElement

Type of TextElement to manipulate.

| Edit this page View Source

Right<TElement>(TElement)

Sets the text alignment to right.

Declaration
public static TElement Right<TElement>(this TElement element) where TElement : Block
Parameters
Type Name Description
TElement element

TextElement to manipulate.

Returns
Type Description
TElement

element, allowing this function to be used with Fluent syntax.

Type Parameters
Name Description
TElement

Type of TextElement to manipulate.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX