TextBox.TextDecorations 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 dekorasi teks untuk diterapkan ke kotak teks.
public:
property System::Windows::TextDecorationCollection ^ TextDecorations { System::Windows::TextDecorationCollection ^ get(); void set(System::Windows::TextDecorationCollection ^ value); };
public System.Windows.TextDecorationCollection TextDecorations { get; set; }
member this.TextDecorations : System.Windows.TextDecorationCollection with get, set
Public Property TextDecorations As TextDecorationCollection
Nilai Properti
Koleksi TextDecorationCollection yang berisi dekorasi teks untuk diterapkan ke kotak teks. Defaultnya adalah null (tidak ada dekorasi teks yang diterapkan).
Contoh
Contoh berikut menunjukkan cara mengatur atribut TextDecorations, menggunakan Run sebagai elemen contoh.
<FlowDocument ColumnWidth="200">
<Paragraph>
<Run TextDecorations="Strikethrough">
This text will render with the strikethrough effect.
</Run>
</Paragraph>
</FlowDocument>
Gambar berikut menunjukkan bagaimana contoh ini ditampilkan.
Gambar berikut menunjukkan bagaimana OverLinedekorasi , , Baselinedan Underline dirender, masing-masing.
Contoh berikut menunjukkan cara mengatur properti TextDecorations secara terprogram.
Run run1 = new Run("This text will render with the strikethrough effect.");
run1.TextDecorations = TextDecorations.Strikethrough;
Dim run1 As New Run("This text will render with the strikethrough effect.")
run1.TextDecorations = TextDecorations.Strikethrough
Keterangan
Objek TextDecoration adalah ornamentasi visual yang dapat Anda tambahkan ke teks. Ada empat jenis dekorasi teks: garis bawah, garis besar, coretan, dan garis besar. Untuk informasi selengkapnya tentang dekorasi teks, lihat Cara: Membuat Dekorasi Teks.
Informasi Properti Dependensi
| Item | Nilai |
|---|---|
| Bidang pengidentifikasi | TextDecorationsProperty |
Properti metadata diatur ke true |
AffectsRender |