TextFormattingRunProperties TextFormattingRunProperties TextFormattingRunProperties TextFormattingRunProperties Class

Definition

Holds text formatting property information. This class derives from the abstract WPF 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 operations return different objects. For each unique set of TextFormattingRunProperties there exists exactly one object instance. If a TextFormattingRunProperties has reference equality to another, their properties are identical. Conversely, if a TextFormattingRunProperties object has reference inequality, the properties are distinct.

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

TextFormattingRunProperties may have empty properties. An empty property inherits the empty properties from some additional text. The TextFormattingRunProperties object can determine whether a property is empty or not: [PropertyName]Empty property. TextFormattingRunProperties also contains a facility for emptying a property: ClearPropertyName.

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

Returns true if 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

Returns the opacity of the foreground.

ForegroundOpacityEmpty ForegroundOpacityEmpty ForegroundOpacityEmpty ForegroundOpacityEmpty

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

Italic Italic Italic Italic

Returns true if 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 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 all properties the same, but clears the BackgroundOpacity property.

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

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

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

Gets a new TextFormattingRunProperties ith 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 all properties the same, but clears the ForegroundOpacity property.

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 brush.

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 interned TextFormattingRunProperties object.

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

Determines whether font sizes for two TextFormattingRunProperties 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 background.

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 brush.

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

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

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

Gets a new TextFormattingRunProperties with the properties of this one but with the Bold property set to isBold.

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

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

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 hintingSize.

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 renderingSize.

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

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

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 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 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 isItalic.

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 textDecorations.

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 textEffects.

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

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

Applies to