سؤال

Hi I was wondering if there is a way to turn of the underline text decoration property with applypropertyvalue, or if there was a better way to do it.

I have this code that works fine:

textselectrangea.ApplyPropertyValue(Inline.TextDecorationsProperty, TextDecorations.Underline);

but when I want to turn it off there is no textdecoration.none

textselectrangea.ApplyPropertyValue(Inline.TextDecorationsProperty, TextDecorations.None);
هل كانت مفيدة؟

المحلول

Set the second parameter to null:

textselectrangea.ApplyPropertyValue(Inline.TextDecorationsProperty, null);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top