Pre loader

WPF - Capture key events in custom modifier

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

Hi,

I made a custom modifier and tried to capture a keydown event in Custom Modifiers in abstract “Overriding Key Events” described. The problem is that this event is only fired when SciChartSurface is on focus but for standard modifier like MouseWheelModifier it is working properly. Is there any way to capture the event for whole application?

Version
6.6.0.26505
  • You must to post comments
0
0

Hi Marcus,

Discussing this with the team today. I think the best way would be to set focus on mouseover. Can you try something like this?

<Style TargetType="{x:Type s:SciChartSurface}">
    <Style.Triggers>
        <Trigger Property="IsMouseOver" Value="True">
            <Setter Property="FocusManager.FocusedElement" Value="{Binding RelativeSource={RelativeSource Self}}"></Setter>
        </Trigger>
    </Style.Triggers>
</Style>

Or, if that doesn’t work, another programmatic way to set focus on MouseEnter. This will steal focus from whatever else in your app has it. Like textboxes or buttons or forms.

Best regards
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.