Hi Lorenzo,
You can achieve
your requirement of “Fire the SelectionChanging event of SfChart when right
click on the segment” with the help of call onMouseLeftButtonDown in the
OnMouseRightButtonDown override method and call onMouseLeftButtonUp in the
OnMouseRightButtonUp override method as per the below code example.
CodeSnippet:
|
<local:ChartExt
x:Name="chart" SelectionChanging="chart_SelectionChanging">
.
. .
<chart:SfChart.Behaviors>
. . .
<chart:ChartSelectionBehavior
EnableSegmentSelection="True"/>
</chart:SfChart.Behaviors>
</local:ChartExt>
|
|
private
void chart_SelectionChanging(object
sender, ChartSelectionChangingEventArgs e)
{
}
|
|
public
class ChartExt : SfChart
{
protected
override void OnMouseRightButtonDown(MouseButtonEventArgs
{
base.OnMouseRightButtonDown(e);
this.OnMouseLeftButtonDown(e);
}
protected
override void OnMouseRightButtonUp(MouseButtonEventArgs e
{
base.OnMouseRightButtonUp(e);
this.OnMouseLeftButtonUp(e);
}
}
|
We have
attached the sample for your reference, please find the sample from the below
attachment.
Please let
us know if you have further assistance.
Regards,
Yuvaraj.
Attachment:
ChartSample_710770dc.zip