Я хочу подчеркнуть выделенный текст, используя textrange в ApplyProperyValue. Вот моя одна строка кода:Подчеркнутый текст с использованием ApplyPropertyValue
new TextRange(start, end).ApplyPropertyValue(??, TextDecorations.Underline);
Я хочу подчеркнуть выделенный текст, используя textrange в ApplyProperyValue. Вот моя одна строка кода:Подчеркнутый текст с использованием ApplyPropertyValue
new TextRange(start, end).ApplyPropertyValue(??, TextDecorations.Underline);
Вам необходимо пройти свойство зависимостей там что Inline.TextDecorationsProperty
-
new TextRange(start, end).ApplyPropertyValue(Inline.TextDecorationsProperty,
TextDecorations.Underline);
Согласно MSDN файл TextRange.ApplyPropertyValue Method
, метод TextRange.ApplyPropertyValue Method
принимает DependencyProperty
и Object
.
public void ApplyPropertyValue(
DependencyProperty formattingProperty,
Object value
)
Возможно, вы ищете Inline.TextDecorationsPropertyProperty
Dependency Property.
new TextRange(start, end).ApplyPropertyValue(
Inline.TextDecorationsProperty,
TextDecorations.Underline);
Хорошо, что случилось с этим кодом? –
Я использую "??" в аргументе значения свойства, что я должен заменить? – daniyalahmad