WPF TextDecorations
-
Moin,
Ich Möchte einen text unterstrichen Anzeigen Lassen
if (Button7.IsChecked == true) { richTextBox1.Selection.ApplyPropertyValue(TextBlock.TextDecorationsProperty, TextDecorations.Underline); } if (Button7.IsChecked == false) { // Das Klappt nicht richTextBox1.Selection.ApplyPropertyValue(TextBlock.TextDecorationsProperty, TextDecorations.Normal); }
LG Andy und Frohe Weinachten :xmas2: :xmas2: :xmas2:
-
Was heisst "klappt nicht"?
Grüssli
-
der befehl Normal ist in der Klasse nicht Vorhanden http://msdn.microsoft.com/de-de/library/system.windows.textdecorations.aspx ?? aber wie Bekomm ich die Underline Wieder Weg ??
-
richTextBox1.Selection.ApplyPropertyValue(Inline.TextDecorationsProperty, null);
Frohe Weihnacht :xmas2:
-
Steht übrigens auch unter
TextBlock.TextDecorations
undInline.TextDecorations
:MSDN schrieb:
The default value is null (no text decorations applied).
Grüssli