-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
TextRun.xml
167 lines (159 loc) · 10.9 KB
/
TextRun.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<Type Name="TextRun" FullName="System.Windows.Media.TextFormatting.TextRun">
<TypeSignature Language="C#" Value="public abstract class TextRun" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit TextRun extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Windows.Media.TextFormatting.TextRun" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class TextRun" />
<TypeSignature Language="F#" Value="type TextRun = class" />
<TypeSignature Language="C++ CLI" Value="public ref class TextRun abstract" />
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Represents a sequence of characters that share a single property set.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A text run is a sequence of characters sharing a single property set. Any change to the format, such as font style, foreground color, font family, or any other formatting effect, breaks the text run. The following example illustrates how changes in formatting to a text string results in a series of text runs - each text run has a common set of formatting properties.
The <xref:System.Windows.Media.TextFormatting.TextRun> class is the root of a type hierarchy representing several types of text content processed by <xref:System.Windows.Media.TextFormatting.TextFormatter>. Each class that is derived from <xref:System.Windows.Media.TextFormatting.TextRun> represents a distinct type of text content.
|Class|Description|
|-----------|-----------------|
|<xref:System.Windows.Media.TextFormatting.TextRun>|Root of the hierarchy. Defines a group of characters that share the same set of character properties.|
|<xref:System.Windows.Media.TextFormatting.TextCharacters>|Defines a collection of character glyphs from a distinct physical typeface.|
|<xref:System.Windows.Media.TextFormatting.TextEmbeddedObject>|Defines a type of text content in which measuring, hit testing, and drawing of the entire content is done as a distinct entity. An example of this type of content is a button in the middle of the line of text.|
|<xref:System.Windows.Media.TextFormatting.TextEndOfLine>|Defines a line-break character code.|
|<xref:System.Windows.Media.TextFormatting.TextEndOfParagraph>|Defines a paragraph-break character code. Derives from <xref:System.Windows.Media.TextFormatting.TextEndOfLine>.|
|<xref:System.Windows.Media.TextFormatting.TextEndOfSegment>|Defines a segment break marker.|
|<xref:System.Windows.Media.TextFormatting.TextHidden>|Defines a range of non-visible characters.|
|<xref:System.Windows.Media.TextFormatting.TextModifier>|Defines the beginning of a modification scope.|
## Examples
In the following example, an override for the <xref:System.Windows.Media.TextFormatting.TextSource.GetTextRun%2A> method is implemented.
:::code language="csharp" source="~/snippets/csharp/System.Windows.Media.TextFormatting/MinMaxParagraphWidth/Overview/CustomTextClasses.cs" id="Snippettextformattingsnippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/TextFormattingSnippets/visualbasic/customtextclasses.vb" id="Snippettextformattingsnippet4":::
]]></format>
</remarks>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkID=159965">Advanced Text Formatting Sample</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected TextRun ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Media.TextFormatting.TextRun.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberSignature Language="C++ CLI" Value="protected:
 TextRun();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Creates an instance of a <see cref="T:System.Windows.Media.TextFormatting.TextRun" /> object.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CharacterBufferReference">
<MemberSignature Language="C#" Value="public abstract System.Windows.Media.TextFormatting.CharacterBufferReference CharacterBufferReference { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Media.TextFormatting.CharacterBufferReference CharacterBufferReference" />
<MemberSignature Language="DocId" Value="P:System.Windows.Media.TextFormatting.TextRun.CharacterBufferReference" />
<MemberSignature Language="VB.NET" Value="Public MustOverride ReadOnly Property CharacterBufferReference As CharacterBufferReference" />
<MemberSignature Language="F#" Value="member this.CharacterBufferReference : System.Windows.Media.TextFormatting.CharacterBufferReference" Usage="System.Windows.Media.TextFormatting.TextRun.CharacterBufferReference" />
<MemberSignature Language="C++ CLI" Value="public:
 abstract property System::Windows::Media::TextFormatting::CharacterBufferReference CharacterBufferReference { System::Windows::Media::TextFormatting::CharacterBufferReference get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Media.TextFormatting.CharacterBufferReference</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the text run character buffer.</summary>
<value>A <see cref="T:System.Windows.Media.TextFormatting.CharacterBufferReference" /> value representing the characters in the text run.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Length">
<MemberSignature Language="C#" Value="public abstract int Length { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Length" />
<MemberSignature Language="DocId" Value="P:System.Windows.Media.TextFormatting.TextRun.Length" />
<MemberSignature Language="VB.NET" Value="Public MustOverride ReadOnly Property Length As Integer" />
<MemberSignature Language="F#" Value="member this.Length : int" Usage="System.Windows.Media.TextFormatting.TextRun.Length" />
<MemberSignature Language="C++ CLI" Value="public:
 abstract property int Length { int get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the number of characters in the text run.</summary>
<value>An <see cref="T:System.Int32" /> value that represents the number of characters.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Properties">
<MemberSignature Language="C#" Value="public abstract System.Windows.Media.TextFormatting.TextRunProperties Properties { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Media.TextFormatting.TextRunProperties Properties" />
<MemberSignature Language="DocId" Value="P:System.Windows.Media.TextFormatting.TextRun.Properties" />
<MemberSignature Language="VB.NET" Value="Public MustOverride ReadOnly Property Properties As TextRunProperties" />
<MemberSignature Language="F#" Value="member this.Properties : System.Windows.Media.TextFormatting.TextRunProperties" Usage="System.Windows.Media.TextFormatting.TextRun.Properties" />
<MemberSignature Language="C++ CLI" Value="public:
 abstract property System::Windows::Media::TextFormatting::TextRunProperties ^ Properties { System::Windows::Media::TextFormatting::TextRunProperties ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Media.TextFormatting.TextRunProperties</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the set of text properties that are shared by every character in the text run, such as typeface or foreground brush.</summary>
<value>A <see cref="T:System.Windows.Media.TextFormatting.TextRunProperties" /> value that represents the set of shared text properties.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>