PasteDragDrop Binding

SyntaxEditor for WPF Forum

Posted 3 years ago by Kevin Hur - CNC Software, Inc.
Version: 21.1.2
Avatar

Hello, I have a question regarding the PasteDragDrop command

When introducing the PasteDragDrop into the xaml, it will create a function in the xaml.cs file. 

For example, writing the following in the xaml:

PasteDragDrop="SyntaxEditor_OnPasteDragProp"

Will create the function in the xaml.cs file. Is there anyway to redirect this function to a .cs file within the xaml?

Comments (1)

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

Hi Kevin,

The event handlers being automatically added to the "*.xaml.cs" file are a productivity feature of Visual Studio that component developers like us do not have control over. The event handler must be part of the partial class from which the XAML is based, so it is not clear what you are trying to accomplish by redirecting them to a different file. If you have the same event handler in multiple views and you want to share logic between them, you could always place the shared method in some form of "helper" class and call into that method from each of the individual event handlers.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.