SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
I have a ListBox containing ListBoxItems that are UserControls containing a SciChartSurface.
My user needs to be able to select an item in the ListBox. I find that if you click on the SciChartSurface, the item does not get selected. I had to click outside the SciChartSurface to select the ListBoxItem.
Is there an easy way to make SciChartSurface not consume the mouse event? The user will not be manipulating anything in the SciChartSurface so there is no need for it to handle any mouse events.
I looked at SciChart example [Create Multiseries Charts]=>[Dashboard Style Charts].
It appears (I tried it out and it worked) that putting the SciChartSurface inside a Grid and adding a Border as the last item in the Grid makes the ListBoxItem selectable when clicking on the chart surface.
Sandbox code attached in zip file.
Do you have any ChartModifiers registered on the SciChartSurface? If there are no ChartModifiers (RubberBandXyZoomModifier, ZoomExtentsModifier) then mouse events will not be handled.
The other thing is that sometimes in WPF elements don’t report mouse events if the background is null. e.g. consider this:
<!-- Clicking the grid does not raise a mouse event --> <Grid> <!-- ... --> </Grid>
<!-- Clicking the grid does raise a mouse event --> <Grid Background="Transparent"> <!-- ... --> </Grid>
Please login first to submit.