문제

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