GlyphRunDrawing.GlyphRun Propriedade
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Obtém ou define o GlyphRun que descreve o texto a desenhar.
public:
property System::Windows::Media::GlyphRun ^ GlyphRun { System::Windows::Media::GlyphRun ^ get(); void set(System::Windows::Media::GlyphRun ^ value); };
public System.Windows.Media.GlyphRun GlyphRun { get; set; }
member this.GlyphRun : System.Windows.Media.GlyphRun with get, set
Public Property GlyphRun As GlyphRun
Valor de Propriedade
O GlyphRun que descreve o texto a desenhar. O valor predefinido é null.
Exemplos
O exemplo seguinte usa um GlyphRunDrawing para desenhar o texto "Hello World".
GlyphRun theGlyphRun = new GlyphRun(
new GlyphTypeface(new Uri(@"C:\WINDOWS\Fonts\TIMES.TTF")),
0,
false,
13.333333333333334,
new ushort[]{43, 72, 79, 79, 82, 3, 58, 82, 85, 79, 71},
new Point(0, 12.29),
new double[]{
9.62666666666667, 7.41333333333333, 2.96,
2.96, 7.41333333333333, 3.70666666666667,
12.5866666666667, 7.41333333333333,
4.44, 2.96, 7.41333333333333},
null,
null,
null,
null,
null,
null
);
GlyphRunDrawing gDrawing = new GlyphRunDrawing(Brushes.Black, theGlyphRun);
<GlyphRunDrawing ForegroundBrush="Black">
<GlyphRunDrawing.GlyphRun>
<GlyphRun
CaretStops="{x:Null}"
ClusterMap="{x:Null}"
IsSideways="False"
GlyphOffsets="{x:Null}"
GlyphIndices="43 72 79 79 82 3 58 82 85 79 71"
BaselineOrigin="0,12.29"
FontRenderingEmSize="13.333333333333334"
DeviceFontName="{x:Null}"
AdvanceWidths="9.62666666666667 7.41333333333333 2.96 2.96 7.41333333333333 3.70666666666667 12.5866666666667 7.41333333333333 4.44 2.96 7.41333333333333"
BidiLevel="0">
<GlyphRun.GlyphTypeface>
<GlyphTypeface FontUri="C:\WINDOWS\Fonts\TIMES.TTF" />
</GlyphRun.GlyphTypeface>
</GlyphRun>
</GlyphRunDrawing.GlyphRun>
</GlyphRunDrawing>
A GlyphRun é um objeto de baixo nível destinado a ser usado em apresentações de documentos de formato fixo e cenários de impressão. Uma forma mais simples de desenhar texto no ecrã é usar um Label ou um TextBlock. Para mais informações sobre GlyphRun, veja a Introdução ao Objeto GlyphRun e Visão Geral do Elemento Glyphs .
Observações
Informação de Propriedade de Dependência
| Iteme | Value |
|---|---|
| Campo identificador | GlyphRunProperty |
Propriedades dos metadados definidas como true |
None |