TextFormattingRunProperties TextFormattingRunProperties TextFormattingRunProperties TextFormattingRunProperties Class

Definition

Holds text formatting property information. This class derives from the abstract TextRunProperties class.

public ref class TextFormattingRunProperties sealed : System::Windows::Media::TextFormatting::TextRunProperties, System::Runtime::Serialization::IObjectReference, System::Runtime::Serialization::ISerializable
public sealed class TextFormattingRunProperties : System.Windows.Media.TextFormatting.TextRunProperties, System.Runtime.Serialization.IObjectReference, System.Runtime.Serialization.ISerializable
type TextFormattingRunProperties = class
    inherit TextRunProperties
    interface ISerializable
    interface IObjectReference
Public NotInheritable Class TextFormattingRunProperties
Inherits TextRunProperties
Implements IObjectReference, ISerializable
Inheritance
TextFormattingRunPropertiesTextFormattingRunPropertiesTextFormattingRunPropertiesTextFormattingRunProperties
Implements

Remarks

This class is used to hold all information about the text formatting properties. Once created, it is immutable, and all modifications of the object return different objects. For each unique set of TextFormattingRunProperties there exists exactly one object. If a TextFormattingRunProperties has reference equality to another, their properties are identical. Conversely, if a TextFormattingRunProperties object has reference inequality, their properties are different.

Checking reference equality is the only way to determine whether two TextFormattingRunProperties are different. Checking the equality of each property of the object may indicate the two are identical, but that may or may not be the case.

A TextFormattingRunProperties instance may have empty properties. An empty property inherits the empty properties from some additional text. TextFormattingRunProperties has methods that determine whether a property is empty or not (PropertyNameEmpty) and that empty a property (PropertyNameClear).

All freezable fields of the TextFormattingRunProperties object are frozen on creation.

Properties

BackgroundBrush BackgroundBrush BackgroundBrush BackgroundBrush

Gets the background brush.

BackgroundBrushEmpty BackgroundBrushEmpty BackgroundBrushEmpty BackgroundBrushEmpty

Determines whether the background brush is empty.

BackgroundOpacity BackgroundOpacity BackgroundOpacity BackgroundOpacity

Returns the opacity of the background.

BackgroundOpacityEmpty BackgroundOpacityEmpty BackgroundOpacityEmpty BackgroundOpacityEmpty

Determines whether any custom opacity is explicitly set for the background.

Bold Bold Bold Bold

Determines whether the formatting is made explicitly bold.

BoldEmpty BoldEmpty BoldEmpty BoldEmpty

Determines whether the bold property is set.

CultureInfo CultureInfo CultureInfo CultureInfo

Gets the culture information.

CultureInfoEmpty CultureInfoEmpty CultureInfoEmpty CultureInfoEmpty

Determines whether the culture info is empty.

FontHintingEmSize FontHintingEmSize FontHintingEmSize FontHintingEmSize

Gets the font hinting size.

FontHintingEmSizeEmpty FontHintingEmSizeEmpty FontHintingEmSizeEmpty FontHintingEmSizeEmpty

Determines whether the font hinting size is empty.

FontRenderingEmSize FontRenderingEmSize FontRenderingEmSize FontRenderingEmSize

Gets the font rendering size.

FontRenderingEmSizeEmpty FontRenderingEmSizeEmpty FontRenderingEmSizeEmpty FontRenderingEmSizeEmpty

Determines whether the size is empty.

ForegroundBrush ForegroundBrush ForegroundBrush ForegroundBrush

Gets the foreground brush.

ForegroundBrushEmpty ForegroundBrushEmpty ForegroundBrushEmpty ForegroundBrushEmpty

Determines whether the foreground brush is empty.

ForegroundOpacity ForegroundOpacity ForegroundOpacity ForegroundOpacity

Gets the opacity of the foreground.

ForegroundOpacityEmpty ForegroundOpacityEmpty ForegroundOpacityEmpty ForegroundOpacityEmpty

Determines whether any custom opacity is explicitly set for the foreground.

Italic Italic Italic Italic

Determines whether the formatting is made explicitly italic.

ItalicEmpty ItalicEmpty ItalicEmpty ItalicEmpty

Determines whether the italic property is set.

TextDecorations TextDecorations TextDecorations TextDecorations

Gets the decorations for the text.

TextDecorationsEmpty TextDecorationsEmpty TextDecorationsEmpty TextDecorationsEmpty

Determines whether the text decorations collection is empty.

TextEffects TextEffects TextEffects TextEffects

Gets the text effects for the text.

TextEffectsEmpty TextEffectsEmpty TextEffectsEmpty TextEffectsEmpty

Determines whether the text effects collection is empty.

Typeface Typeface Typeface Typeface

Gets the typeface for the text.

TypefaceEmpty TypefaceEmpty TypefaceEmpty TypefaceEmpty

Determines whether the typeface is empty.

Methods

BackgroundBrushSame(Brush) BackgroundBrushSame(Brush) BackgroundBrushSame(Brush) BackgroundBrushSame(Brush)

Determines whether the background brush for this TextFormattingRunProperties is the same as the specified brush.

ClearBackgroundBrush() ClearBackgroundBrush() ClearBackgroundBrush() ClearBackgroundBrush()

Gets a new TextFormattingRunProperties with all properties the same except for the background brush.

ClearBackgroundOpacity() ClearBackgroundOpacity() ClearBackgroundOpacity() ClearBackgroundOpacity()

Gets a new TextFormattingRunProperties with the BackgroundOpacity property cleared.

ClearBold() ClearBold() ClearBold() ClearBold()

Gets a new TextFormattingRunProperties with the Bold property cleared.

ClearCultureInfo() ClearCultureInfo() ClearCultureInfo() ClearCultureInfo()

Gets a new TextFormattingRunProperties with all properties the same except for the culture info.

ClearFontHintingEmSize() ClearFontHintingEmSize() ClearFontHintingEmSize() ClearFontHintingEmSize()

Gets a new TextFormattingRunProperties with all properties the same except for the font hinting size.

ClearFontRenderingEmSize() ClearFontRenderingEmSize() ClearFontRenderingEmSize() ClearFontRenderingEmSize()

Gets a new TextFormattingRunProperties with all properties the same except for the rendering size.

ClearForegroundBrush() ClearForegroundBrush() ClearForegroundBrush() ClearForegroundBrush()

Gets a new TextFormattingRunProperties with all properties the same except for the foreground brush.

ClearForegroundOpacity() ClearForegroundOpacity() ClearForegroundOpacity() ClearForegroundOpacity()

Gets a new TextFormattingRunProperties with the ForegroundOpacity property cleared.

ClearItalic() ClearItalic() ClearItalic() ClearItalic()

Gets a new TextFormattingRunProperties with all properties the same, but clears the Italic property.

ClearTextDecorations() ClearTextDecorations() ClearTextDecorations() ClearTextDecorations()

Gets a new TextFormattingRunProperties with all properties the same except for the text decorations.

ClearTextEffects() ClearTextEffects() ClearTextEffects() ClearTextEffects()

Gets a new TextFormattingRunProperties with all properties the same except for the text effects.

ClearTypeface() ClearTypeface() ClearTypeface() ClearTypeface()

Gets a new TextFormattingRunProperties with all properties the same except for the typeface.

CreateTextFormattingRunProperties() CreateTextFormattingRunProperties() CreateTextFormattingRunProperties() CreateTextFormattingRunProperties()

Initializes a new instance of TextFormattingRunProperties.

CreateTextFormattingRunProperties(Typeface, Double, Color) CreateTextFormattingRunProperties(Typeface, Double, Color) CreateTextFormattingRunProperties(Typeface, Double, Color) CreateTextFormattingRunProperties(Typeface, Double, Color)

Initializes a new instance of TextFormattingRunProperties with the specified options.

CreateTextFormattingRunProperties(Brush, Brush, Typeface, Nullable<Double>, Nullable<Double>, TextDecorationCollection, TextEffectCollection, CultureInfo) CreateTextFormattingRunProperties(Brush, Brush, Typeface, Nullable<Double>, Nullable<Double>, TextDecorationCollection, TextEffectCollection, CultureInfo) CreateTextFormattingRunProperties(Brush, Brush, Typeface, Nullable<Double>, Nullable<Double>, TextDecorationCollection, TextEffectCollection, CultureInfo) CreateTextFormattingRunProperties(Brush, Brush, Typeface, Nullable<Double>, Nullable<Double>, TextDecorationCollection, TextEffectCollection, CultureInfo)

Initializes a new instance of TextFormattingRunProperties with the specified options.

ForegroundBrushSame(Brush) ForegroundBrushSame(Brush) ForegroundBrushSame(Brush) ForegroundBrushSame(Brush)

Determines whether the foreground brush for this TextFormattingRunProperties is the same as the specified.

GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext)

Serializes the TextFormattingRunProperties object using a XamlWriter.

GetRealObject(StreamingContext) GetRealObject(StreamingContext) GetRealObject(StreamingContext) GetRealObject(StreamingContext)

Gets the cached TextFormattingRunProperties object, or creates one if none exists.

SameSize(TextFormattingRunProperties) SameSize(TextFormattingRunProperties) SameSize(TextFormattingRunProperties) SameSize(TextFormattingRunProperties)

Determines whether font sizes for two TextFormattingRunProperties objects are the same.

SetBackground(Color) SetBackground(Color) SetBackground(Color) SetBackground(Color)

Gets a new TextFormattingRunProperties with the properties of this one but with the background set to the specified color.

SetBackgroundBrush(Brush) SetBackgroundBrush(Brush) SetBackgroundBrush(Brush) SetBackgroundBrush(Brush)

Gets a new TextFormattingRunProperties with the properties of this one but with the background brush set to the specified brush.

SetBackgroundOpacity(Double) SetBackgroundOpacity(Double) SetBackgroundOpacity(Double) SetBackgroundOpacity(Double)

Gets a new TextFormattingRunProperties with the BackgroundOpacity property set to the specified opacity.

SetBold(Boolean) SetBold(Boolean) SetBold(Boolean) SetBold(Boolean)

Returns a new TextFormattingRunProperties with the properties of this one but with the Bold property set the specified bold value.

SetCultureInfo(CultureInfo) SetCultureInfo(CultureInfo) SetCultureInfo(CultureInfo) SetCultureInfo(CultureInfo)

Gets a new TextFormattingRunProperties with the properties of this one but with the culture set to the specified culture information.

SetFontHintingEmSize(Double) SetFontHintingEmSize(Double) SetFontHintingEmSize(Double) SetFontHintingEmSize(Double)

Gets a new TextFormattingRunProperties with the properties of this one but with the font hinting size set to the specified size.

SetFontRenderingEmSize(Double) SetFontRenderingEmSize(Double) SetFontRenderingEmSize(Double) SetFontRenderingEmSize(Double)

Gets a new TextFormattingRunProperties with the properties of this one but with the font rendering size set to the specified size.

SetForeground(Color) SetForeground(Color) SetForeground(Color) SetForeground(Color)

Gets a new TextFormattingRunProperties with the properties of this one but with the foreground set to the specified color

SetForegroundBrush(Brush) SetForegroundBrush(Brush) SetForegroundBrush(Brush) SetForegroundBrush(Brush)

Gets a new TextFormattingRunProperties with the properties of this one but with the new foreground Brush set to the specified brush.

SetForegroundOpacity(Double) SetForegroundOpacity(Double) SetForegroundOpacity(Double) SetForegroundOpacity(Double)

Gets a new TextFormattingRunProperties with the properties of this one but with the ForegroundOpacity property set to the specified opacity.

SetItalic(Boolean) SetItalic(Boolean) SetItalic(Boolean) SetItalic(Boolean)

Gets a new TextFormattingRunProperties with the properties of this one but with the Italic property set to the italic value.

SetTextDecorations(TextDecorationCollection) SetTextDecorations(TextDecorationCollection) SetTextDecorations(TextDecorationCollection) SetTextDecorations(TextDecorationCollection)

Gets a new TextFormattingRunProperties with the properties of this one but with the text decorations set to the specified text decorations.

SetTextEffects(TextEffectCollection) SetTextEffects(TextEffectCollection) SetTextEffects(TextEffectCollection) SetTextEffects(TextEffectCollection)

Gets a new TextFormattingRunProperties with the properties of this one but with the text effects set to the specified text effects.

SetTypeface(Typeface) SetTypeface(Typeface) SetTypeface(Typeface) SetTypeface(Typeface)

Gets a new TextFormattingRunProperties with the properties of this one but with the typeface set to the specified typeface.

Applies to