Questions tagged [avalonedit]
AvalonEdit is a .NET WPF-based source code editor component developed for SharpDevelop 4.0 "Mirador".
188
questions
0
votes
0
answers
22
views
How to call AvalonEdit Methods/Commands?
I am looking into the documentation of AvalonEdit - http://avalonedit.net/documentation/,
Which contains all sorts of useful functionalities and method calls.
I am not sure how to call and apply them.
...
0
votes
0
answers
16
views
Highlighting text in AvalonEdit does not work for me
for my project I am crating an XML editor with AvalonEdit. For each XML Element in the editor I created a TextSegment. The TextSegments are stored in the TextSegmentCollection, so the start and end ...
0
votes
0
answers
13
views
Trying to call function in my XAml Gui for Avalon
public MainWindow()
{
public static IHighlightingDefinition Load(XshdSyntaxDefinition syntaxDefinition,IHighlightingDefinitionReferenceResolver resolver)
Load('[lua.xshd]', ...
0
votes
0
answers
10
views
How do you save the current Highlighting ruleset to an XSHD using AvalonEdit?
I've found plenty of examples of loading highlighting rules (vai resources, streams, XSHD files etc), but I haven't been able to work out the sequence to actually save the currently active ...
0
votes
0
answers
48
views
How to create a case insensitive Keyword highlighting rule in AvalonEdit
I'm looking to update my .xshd highlighting file to match certain keywords case-insensitively.
As an example, the highlighting rules below are a subset of the SQL highlighting file on the AvalonEdit ...
0
votes
0
answers
41
views
Highlight all occurances of a selected word in AvalonEdit using an IBackgroundRenderer
I am relatively new to C# and I'm working on a simple application that makes use of AvalonEdit as a small code editor embedded in the bottom of the UI.
I want to highlight all occurrences of a ...
0
votes
1
answer
62
views
Is there a faster way to create a Point from a text offset with AvalonEdit?
I am currently drawing in a BackgroundRenderer based on the text, so I need to convert from an offset to a Point, but I have found that this process is slowing down my application (and it's not the ...
2
votes
0
answers
92
views
AvalonEdit How to Create indent guide lines?
How to Create indent guide lines in AvalonEdit, just like in Visual Studio?
1
vote
1
answer
243
views
How to add a right margin to AvalonEdit number line?
I'm using AvalonEdit WPF control with a .Net Framework 4.8 project, using Visual Studio 2019 under Windows 10 64bit.
I need to add a right margin to the linenumbers. To understand what i need i attach ...
0
votes
0
answers
143
views
C# AvalonEdit TextEditor scroll to line from code
I am having a lot of troubles to find a way an AvalonEdit TextEditor scroll to specific line. I have found a topic that is related to my issue :AvalonEdit scroll to line. But I can't understand how to ...
0
votes
0
answers
53
views
Avalon Edit highlight same brackets (open and close)
I am new to Avalon Edit and was trying to figure out a way to highlight open and closing brackets. I am currently trying to edit the code using Span and RuleSet in the xshd file. For example:
My name ...
0
votes
0
answers
133
views
How to change a color of each entered word in Avalon Edit WPF
What am i trying to do is "check color of every single entered word" and then change it into color one by one. For example default color is a black (then check color of words if its not a ...
0
votes
0
answers
122
views
Is it possible to customize the AvalonEdit search panel button icons?
I need to customize the dropdown search panel to match my application but I can seem to figure out how. I am using C# WPF .net Framework 4.7.2
I have tried the below style but it does not recognize ...
1
vote
0
answers
117
views
AvalonEdit in a DataTemplate of a TabControl
I'm experiencing some strange behavior of an AvalonEdit.TextEditor when placed in a TabControl item data template.
I created a simple test app to illustrate as simple as I could manage:
(steps to ...
0
votes
2
answers
274
views
How to change the symbol and color the Tab in AvalonEdit
How to change the symbol and color the Tab character
would like to change the character to the arrow character →
and set the red color
0
votes
0
answers
76
views
AvalonEdit: Highlight based on non-regex rules
Is it possible to highlight text in AvalonEdit based on non-regex rules?
Motivation: I have custom lang with different kind of members and want to show each of them with unique color, but regex doesn'...
0
votes
1
answer
358
views
AvalonEdit XSHD Syntax Highlighting - Ending a Span
I'm using AvalonEdit and working on adding syntax highlighting for a file (with syntax a bit like razor). It's my first time using XSHD files so please forgive me if this is actually easy.
The issue I'...
1
vote
1
answer
303
views
AvalonEdit: Getting Visual Position for IBackgroundRenderer
In my AvalonEdit-based document editor, I am trying to add marker lines to the text view to indicate folds in the document, in a similar way to how Visual Studio joins the start and end of code block ...
3
votes
1
answer
241
views
Text editor with intellisense support for web like Avalon Editor
I need the text editor for web (jQuery) with the code completion (intelli-sense) support like the AvalonEditor for the WPF framework.
Please share the suggestions.
Requirements:
I will have a set of ...
0
votes
1
answer
288
views
Snippets in Avalon Edit
In avalon edit there is a snippet class SnippetReplaceableTextElement and I can't understand how to use it correctly, I wrote something like that and it doesn't work:
...
0
votes
1
answer
168
views
WPF stop an animation when it's not visible on the screen
I'm using AvalonEdit to create an ANSI terminal that properly color codes and implements some styles like underline and reverse (it works wonderfully for that, this isn't a full VT100 kind of thing).
...
0
votes
1
answer
293
views
Avalon Edit Highlighting within Highlighting
With Avalon Edit, I'm looking for a way to provide a highlighting format while inside something that is already formatted.
That is, I'd like to highlight thing inside quotes, but within those quotes ...
0
votes
0
answers
149
views
AvalonEdit TextDocument crash reading large files
I have an editor implemented using AvalonEdit, and when I open a new file I populate the Document with a new TextDocument, and populate that TextDocument with an IEnumerable<char>. That ...
1
vote
1
answer
226
views
Wpf, AvalonEdit and keyboard navigation problem
I have an AvalonEdit on my window. When I press key combination Ctrl+Up or Ctrl+Down when inside editor, AvalonEdit loses focus, which is transferred to a different control, as below:
This sometimes ...
1
vote
1
answer
223
views
AvalonEdit how to add new syntax in converter
I want to add custom highlight in converter and a new syntax (JSON) but, keep using MVVM etc...
That means, I must not go this way:
editor.HighLight = HightLightLoader.Load()
I tried to set my ...
1
vote
1
answer
422
views
How to Render Line Numbers with Document in AvalonEdit?
Is there a way to render line numbers in the left margin along with the AvalonEdit TextEditor document?
1
vote
2
answers
1k
views
How to change syntax highlighting colors of Avalon edit (WPF)?
I'm using the AvalonEdit text editor for a project in WPF and I need to change the syntax colors of a language.
I installed the Nuget package and wrote xmlns:avalonEdit="http://icsharpcode.net/...
0
votes
1
answer
195
views
AvalonEdit Change owner thread
I'm using AvalonEdit since more than 2 years without problems and it work great
I'm just facing one issue on changing text from background thread
using SetOwnerThread() method trigger VerifyAccess() ...
0
votes
1
answer
140
views
VisualLineElementGenerator VerticalAlignment to Center
In my application I'm using the TextEditor from Avalon.
With the following code I'm creating a VisualLineElementGenerator which works just fine:
internal class SoftwareDependencyElementGenerator : ...
0
votes
1
answer
133
views
Can I detect a char position using Regex with a prefix condition?
I have a string representing an equation statement: a = b * c in a tool I am writing.
The string may contains a "comment" suffix to the statement with * representing the comment.
I am using ...
0
votes
0
answers
203
views
How to create event handler for AvalonEdit (ICSharpCode) Text Editor control?
I am creating event handlers for on keypress and on caret position changed.
The "KeyDown" event works fine, but the code for "PositionChanged" fails with the error:
No overload for '...
0
votes
1
answer
637
views
Tooltip position in avalon editor
I have a problem in wpf avalon editor, the position of the tool-tip is not set.
In avalon editor, I have to set tooltip near word when after word space is typed.
But I do not get any solution so that ...
0
votes
1
answer
75
views
How do I set equal character spacing in AvalonEdit such that visual line columns are the same as document line columns
I'm wrapping AvalonEdit into a custom control and I'm trying to display a text file using equal character spacing such that it behaves similarly to notepad. I've done quite a bit of digging but I can'...
0
votes
0
answers
343
views
Avalon Edit Cut\Copy\Paste Commands from MahApps.Metro Button
I'm implementing a custom simplified editor in WPF using AvalonEdit and MahApps.Metro. I am stuck trying to get the cut/copy/paste/undo/redo commands working using MahApps.Metro icon/circle buttons ...
0
votes
1
answer
127
views
Interactions with AvalonEdit window in an AvalonDock
In my application we use AvalonDock for a docking manager, and have a variety of different windows. One of those contains an AvalonEdit editor. We recently noticed one specific interaction issue which ...
2
votes
1
answer
564
views
How to fire an event when mouse hover over a specific text in AvalonEdit?
I have an AvalonEdit WPF based application.
I want to define a specific behaviour when the user hovers with the mouse over a specific text in the editor, similar to tag_binding with python tkinter.
...
1
vote
0
answers
363
views
Avalonedit nested code completion from xml file
I'm using Avalonedit in my wcf application. I have to implement code completion feature(intellisense).
My Requirement
I have an xml file with the following content.This xml data will be updated ...
0
votes
1
answer
115
views
AvalonEdit - XMLFolding -> Ignore the first line
Would it be possible to ignore the first line when trying to update the foldings?
Ignore this line
<?xml version="1.0" encoding="UTF-8"?>
<note>
<to>Tove</to>
<from&...
0
votes
0
answers
306
views
AvalonEdit and Abstract Margin Scrolling together Memory Leak
I have next problem with my project.
I have had to add AbstractMargin to my AvalonEdit control to create some of bookmarks/breakpoints.
When i put my AvalonEdit control into ScrollViewer, ...
9
votes
1
answer
643
views
Cursor position is not changed for up and down key in Avalon text editor
I am using the Avalon text editor and the cursor position is not changed for the key up and key down. Can anyone suggest me how to overcome this issue?
The cursor position properly changes for the ...
1
vote
3
answers
2k
views
WPF AvalonEdit insert text in position
I'm writing my engineering work.
I have a problem with Avalon Edit control.
I want to add some text on button clicked at cursor position. But i cannot do it, I have tried everything i found.
I can't ...
0
votes
1
answer
693
views
Invoke search in Avalon Editor using Button click
I am using AvalonEditor inside a window dialog(WPF). Window dialog host TextEditor control. I have Find button explicit on Window. On click of Button, Search should work inside TextEditor. Can you ...
4
votes
1
answer
471
views
Capture/modify paste event in AvalonEdit
Is there any way to capture the paste event in an AvalonEdit text editor so that the data can be modified?
We are having users paste data from Excel, and for some reason that data is showing up with ...
0
votes
1
answer
669
views
How to add event handler to a C# AvalonEdit Caret PositionChanged event in xaml
I have a data template defined in xaml as:
<DataTemplate>
<avalonEdit:TextEditor
Name="xmlEditor"
SyntaxHighlighting="XML"
FontFamily="Consolas"
FontSize="10pt"
/>
</...
3
votes
2
answers
1k
views
AvalonEdit FoldingStrategy by Indent (Python)
Has someone ever tried to create a FoldingStrategy by the indent level? Like for the programming language python.
BraceFoldingStrategy is no problem because you have a fixed start and end tag. Has ...
2
votes
0
answers
68
views
AvalonEdit XAML for COBOL
Does anyone know if an AvalonEdit XAML syntax for COBOL exists?
I will resort to making one if it doesn't exist yet, but it could be wrong since I don't know the language very well.
0
votes
1
answer
555
views
C# AvalonEdit Highlighting Regex till new line
I am modifying the Code from the AvalonEdit in C# to create another syntax highlighting.
I want to create my own style for LOG-files the highlighted code looks like this:
Time in the front blue and ...
0
votes
1
answer
103
views
WPF: Make AvalonEdit Unfocusable and Uneditable
How can I make AvalonEdit unfocusable and uneditable in my WPF App?
I've tried this:
<avalonEdit:TextEditor
x:Name="AvalonQuery"
xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/...
0
votes
2
answers
299
views
avalonedit:TextEditor MouseWheel event not firing in WPF
Unable to work with MouseWheel event in avalonedit TextEditor.
WPF :
<avalonedit:TextEditor x:Name="txEditor" Margin="18" FontFamily="Consolas" FontSize="16px" ShowLineNumbers="True" MouseWheel="...
2
votes
2
answers
352
views
How to listen for folding event in AvalonEdit
I have successfully added folding to my AvalonEdit document, however, to enable a really useful experience, I need to store the folding state, so next time user open the document, the folding state is ...