AvaloniaUI / AvaloniaEdit

Avalonia-based text editor (port of AvalonEdit)
MIT License
774 stars 149 forks source link

Add custom, clickable margin in demo #420

Closed mgarstenauer closed 5 months ago

mgarstenauer commented 6 months ago

This PR adds a custom margin to the text editor demo. It behaves like the breakpoint margin in Visual Studio. A gray circle is rendered when the mouse is over the margin and a red circle is rendered when the margin is clicked.

Screenshot: image

mgarstenauer commented 5 months ago

I changed the colors to match the breakpoint margin in Visual Studio.

image

I think it would be helpful to add this change to the AvaloniaEdit.Demo. It demonstrates how to use AvaloniaEdit's AbstractMargin. (However, feel free to decline the PR if you don't want to bloat the AvaloniaEdit.Demo - that's fine with me.)