Hi,
am implementing a context menu that has the option to export screen shots of the chart as jpeg.
As soon as i click on the context menu, I loose the cursor modifier.
Possible to export/print the chart with the cursors with the contextmenu??
Thanks
- P S asked 3 months ago
- last active 3 months ago
Hi
How can i add a regular menu : File (open, save , save as….), Edit …
the motivation is the draw a graphs by choosing the File->open from the menu
- sima michaeli asked 7 years ago
- last active 7 years ago
Hi All,
I’ve read the following forum entry on using a context menu with and ALT-Right click to get around problems with event interference:
I have the same problem with zoom and implemented the solution mentioned above. Then I noticed on one of my test apps that the two would live side by side quite nicely without doing anything BUT it made selecting a scatter series trickier. i found that using ReceiveHandledEvents had an effect on the behaviour in that while this was false zoom and context were fine but selecting a series was a bit hit and miss, but while it was true the behaviour in the link was displayed i.e. context menu appearing after zoom operation.
Here’s the XAML;
<s:SciChartSurface x:Name="ChartSurface" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" s:ThemeManager.Theme="Chrome">
<s:SciChartSurface.ContextMenu>
<ContextMenu>
<MenuItem Header="Item1" />
<MenuItem Header="Item2" />
<MenuItem Header="Item3" />
<MenuItem Header="Etc.." />
</ContextMenu>
</s:SciChartSurface.ContextMenu>
<s:SciChartSurface.XAxis>
<s:DateTimeAxis AutoRange="Once"/>
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxes>
<s:NumericAxis x:Name="LinearAxis" Id="LinearAxis" AutoRange="Always" AxisAlignment="Left" AxisTitle="Linear" Style="{StaticResource LinearScaleStyle}"/>
</s:SciChartSurface.YAxes>
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup>
<s:RubberBandXyZoomModifier x:Name="rubberBandZoomModifier" IsEnabled="True" IsXAxisOnly="False" IsAnimated="True" ExecuteOn="MouseRightButton" ZoomExtentsY="False" ReceiveHandledEvents="True"/>
<s:ZoomPanModifier x:Name="zoomPanModifier" ExecuteOn="MouseLeftButton" ZoomExtentsY="False" ReceiveHandledEvents="True" IsEnabled="True" XyDirection="XDirection"/>
<!--
ReceiveHandledEvents * True = context menu appears on completion of a right mouse button zoom operation
ReceiveHandledEvents * False = Zoom and Context menu are fine but selecting a series needs a slow double click type thing
-->
<s:SeriesSelectionModifier ReceiveHandledEvents="True">
</s:SeriesSelectionModifier>
<s:LegendModifier x:Name="SelectedSeriesLegend" ShowLegend="True" GetLegendDataFor="SelectedSeries" Margin="5" SourceMode="AllVisibleSeries" />
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
Can anyone explain this? Is there an accepted workaround? are there any other easy methods of selecting a series that don’t involve clicking on it (e.g. select from legend)?
Thanks in advance
/Stu
- Stuart McCullough asked 9 years ago
- last active 9 years ago
Hi Scichart,
I am struggling with a ContextMenu on a SciChartSurface that wont be displayed.
The problem started when i added mouse panning with the right mouse-button which is the same button the ContextMenu is activated on.
So will this combination even work – with both a ContextMenu and mouse panning with the right mouse button?
To manually validate if the ContextMenu should open or if the panning should be enabled, I have tried to get the mouse coordinates manually in C# to see if the mouse was moved(panning) or if it was a click(ContextMenu). This did not work very well when i afterwards started to pan/zoom again.
Do you have a code example using both a ContextMenu and mouse panning using right mouse button?
Best regards,
Jeppe
- Unisense A/S Tueager asked 10 years ago
- last active 8 years ago