SytaxEditor MouseUp, MouseLeftButtonUp doesn't trigger

SyntaxEditor for WPF Forum

The latest build of this product (v24.1.2) was released 3 months ago, which was before this thread was created.
Posted 2 months ago by Jinzhou Zhang
Version: 24.1.2
Avatar

My code is

<editor:SyntaxEditor x:Name="editor"  Grid.Row="0" AreLineModificationMarksVisible="False"  
                MouseMove="Editor_MouseMove" MouseDoubleClick="Editor_MouseUp" MouseRightButtonUp="Editor_MouseRightButtonUp" 
                FontSize="14" Text="{Binding FormulaString, Mode=OneTime}"
                WordWrapMode="Word" HorizontalScrollBarVisibility="Hidden" CanSplitHorizontally="False"
                     DocumentTextChanged="Editor_DocumentTextChanged" 
                     UserInterfaceUpdate="OnEditorUserInterfaceUpdate" />
private void Editor_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
{
    ...      
}

private void Editor_MouseUp(object sender, MouseButtonEventArgs e)
{
    ...      
}

private void Editor_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
{
    ...      
}

The MouseUp Event does not trigger. I tried MouseLeftButtonUp and it does not work neither. However others like MouseMove, MouseRightButtonUp and MouseDoubleClick are fine. Are these two events still available? If so, how could the two events disabled? This is a legacy project I am migrating. I am not very familiar with the ActiPro.

Comments (3)

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Due to each editor possibly having multiple views and multiple editor controls possibly using the same syntax language, pointer events are handled via an optional event sink language service named IEditorViewPointerInputEventSink.  To drive the logic that invokes the methods on the event sink when mouse events occur, some of those mouse events probably get marked as handled.

Our "IndicatorsDebugging" QuickStart has a DebuggingPointerInputEventSink class that implements IEditorViewPointerInputEventSink and shows an example of creating an event sink to handle pointer (e.g., mouse) events.  That would be a good place to start looking to help get you started on processing pointer events.


Actipro Software Support

Posted 2 months ago by Jinzhou Zhang
Avatar

Hi,

How can I access the IndicatorsDebugging quickstart project?

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

If you run our WPF Controls installer, the QuickStart is a sample within the sample project that is installed, and the files are in this relative path:

\WPF-Controls\Samples\SampleBrowser\ProductSamples\SyntaxEditorSamples\QuickStart\IndicatorsDebugging

You can also browse the source of our sample project online in our GitHub repo and the specific file I was referring to is here.


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.