I want to replace RichTextBox text with this #303
Labels
No labels
Area-Accessibility
Area-Build
Area-CodeCompletion
Area-Document
Area-Documentation
Area-Editing
Area-Folding
Area-Highlighting
Area-i18n
Area-Indentation
Area-NetFx
Area-Rendering
Area-Search
Area-Snippets
dependencies
duplicate
Feedback Needed
help wanted
invalid
Issue-Bug
Issue-Discussion
Issue-Enhancement
Issue-Performance
Issue-Question
on-hold
Resolution-Answered
Resolution-By Design
Resolution-Duplicate
Resolution-Fixed
Resolution-Won't Fix
Up-for-Grabs
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-icsharpcode/AvalonEdit#303
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I want to add colored text by avalonEdit.TextEditor.AppendTxt("test",Brushes.Red )
It is used to display some prompts, because the performance of this is much higher than that of RichTextBox.
But I haven't found such an interface yet. Can you help me?
I also wanted such an interface. So i implemented it my self:
https://github.com/goswinr/AvalonLog Maybe you can use that one.
on the
AvalonLoginstance callpublic void AppendWithBrush(SolidColorBrush br, string s)Thank you for your reply.
This is indeed possible, but I still want to see if there is any C#.
This is indeed ok, but I still want to see if there is C#, F# outputs a series of files
Do you get these files when using the nuget package ?
Put
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>in the poject file file to not have these translation folders.I am not just because of these additional files, because I also want to make some changes, such as controlling whether to scroll to the bottom, etc.
If there are no other controls, I might try to rewrite your process with c#。
If you just want to control scrolling open an issue (or PR) at https://github.com/goswinr/AvalonLog and we discuss it there..
I have roughly rewritten what I need to use, but I found a bug at present. If you insert a string in the middle of a string of multiple colors, it will cause the subsequent color display to be completely confused.
myCode=
private void Button_Click(object sender, RoutedEventArgs e)
{
new Thread(() => {
this.Dispatcher.Invoke(new Action(() => {
avlog.AppendWithBrush(Brushes.Red, "1");
avlog.AppendWithBrush(Brushes.Black, "2");
//avlog.AppendWithBrush(Brushes.Red, "3");
}), null);
}).Start();
}
@dzx815 It is not a bug its a feature. see my answer here: https://github.com/goswinr/AvalonLog/issues/1
I am fairly certain that AvalonEdit is not the right tool for the job. A
RichTextBoxhas features that cannot be mimicked using AvalonEdit. Firstly, AvalonEdit supports only one single font for the whole document and secondly, the highlighting is rule-based and not as with rich text editors like Word based on user input. Implementing these features on top of AvalonEdit is a lot of work, bordering "impossible to get right".