Я регистрирую подсветку синтаксиса с AvalonEdit с помощью:
PythonPrompt.SyntaxHighlighting = pythonHighlighting;
Затем текст может быть введен пользователем на протяжении всей программы. Есть ли способ взять отформатированный текст и переместить его в TextBlock
без потери форматирования?
Поскольку этот отформатированный текст больше не будет редактироваться, я полагаю, что более эффективно создать TextBlock
, чем создавать TextEditor
на лету.