How to change Caret image in syntax editor ?

SyntaxEditor for WPF Forum

Posted 10 years ago by boris hlad
Version: 14.1.0602
Avatar

Hi,

I want to change caret image in syntax editor by  image of wait cursor (or specific image) , is there a property to do that ?

Best regards

Comments (4)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Boris,

The mouse cursor gets set on a low-level internal object that isn't directly accessible publicly.  You might be best off covering the SyntaxEditor with a Rectangle that has a Transparent background and a Cursor set when this state is needed.  Then remove that (or make its backgrond be null) when out of the wait state.


Actipro Software Support

Posted 10 years ago by boris hlad
Avatar

Hi,

I understand the principle but have you some code or example in sample browser using this principle ?

 

Best regards

Boris

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, I mean something like this:

<Grid>
 <editor:SyntaxEditor />
 <Rectangle x:Name="cursorLayer" Background="Transparent" Cursor="Hand" Visibility="Collapsed" />
</Grid>

Then just change the cursorLayer Visibility when appropriate.


Actipro Software Support

Posted 10 years ago by boris hlad
Avatar

Hi,

I applied your solution but my case was a little more complicated because my XAML document has several levels of nesting.

<dockpanel

<shared:PixelSnapper

<shared:PixelSnapper

<docking:docksite

<docking:split container

but solution works very well

 

Thanks a lot

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.