TextDecoration.Location Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau mengatur lokasi vertikal tempat dekorasi teks digambar.
public:
property System::Windows::TextDecorationLocation Location { System::Windows::TextDecorationLocation get(); void set(System::Windows::TextDecorationLocation value); };
public System.Windows.TextDecorationLocation Location { get; set; }
member this.Location : System.Windows.TextDecorationLocation with get, set
Public Property Location As TextDecorationLocation
Nilai Properti
Lokasi vertikal tempat dekorasi teks digambar.
Contoh
Dalam contoh kode berikut, dekorasi teks coretan dibuat dengan kuas warna solid untuk pena. Properti Location disetel ke Strikethrough.
// Use the default font values for the strikethrough text decoration.
private void SetDefaultStrikethrough()
{
// Set the underline decoration directly to the text block.
TextBlock1.TextDecorations = TextDecorations.Strikethrough;
}
' Use the default font values for the strikethrough text decoration.
Private Sub SetDefaultStrikethrough()
' Set the underline decoration directly to the text block.
TextBlock1.TextDecorations = TextDecorations.Strikethrough
End Sub
<!-- Use the default font values for the strikethrough text decoration. -->
<TextBlock
TextDecorations="Strikethrough"
FontSize="36" >
The quick red fox
</TextBlock>
Keterangan
Contoh berikut menunjukkan lokasi dekorasi teks relatif terhadap teks.
Contoh jenis dekorasi teks
Properti PenOffset memungkinkan Anda untuk mengimbangi dekorasi teks dari yang ditentukan Location.
Informasi Properti Dependensi
| Item | Nilai |
|---|---|
| Bidang pengidentifikasi | LocationProperty |
Properti metadata diatur ke true |
Tidak |