Hi,
I am trying to do something pretty simple, I believe - I'd simply like to change the mouse cursor to a hand when the mouse is anywhere over a chart. I've tried several different thing, all with the same result: when the mouse enters the chart it does turn into a hand, but when it enters the actual area where the bars are (i.e. the actual "chart area"), the mouse changes back to an arrow.
Am I missing something simple, or is this just an inherent part of the RadChart that I can't affect?
Thanks to anyone for help!
Craig
First, I put the Cursor="Hand" in the chart XAML:
<telerik:RadChart x:Name="rctChart" LegendStyle="{StaticResource ChartLegend}"
PaletteBrushesRepeat="False" TitleStyle="{StaticResource ChartTitleLarge}" Cursor="Hand" >
<telerik:RadChart.DefaultView>
<telerik:ChartDefaultView>
<telerik:ChartDefaultView.ChartArea>
<telerik:ChartArea Cursor="Hand" />
</telerik:ChartDefaultView.ChartArea>
</telerik:ChartDefaultView>
</telerik:RadChart.DefaultView>
</telerik:RadChart>
And I also tried it with MouseEnter and MouseLeave event handlers:
private void rctChart_MouseEnter(object sender, MouseEventArgs e)
{
RadChart ct = sender as RadChart;
if (ct != null)
{
ct.Cursor = Cursors.Hand;
ct.DefaultView.ChartArea.Cursor = Cursors.Hand;
}
}
private void rctChart_MouseLeave(object sender, MouseEventArgs e)
{
RadChart ct = sender as RadChart;
if (ct != null)
{
ct.Cursor = Cursors.Arrow;
ct.DefaultView.ChartArea.Cursor = Cursors.Arrow;
}
}
I am trying to do something pretty simple, I believe - I'd simply like to change the mouse cursor to a hand when the mouse is anywhere over a chart. I've tried several different thing, all with the same result: when the mouse enters the chart it does turn into a hand, but when it enters the actual area where the bars are (i.e. the actual "chart area"), the mouse changes back to an arrow.
Am I missing something simple, or is this just an inherent part of the RadChart that I can't affect?
Thanks to anyone for help!
Craig
First, I put the Cursor="Hand" in the chart XAML:
<telerik:RadChart x:Name="rctChart" LegendStyle="{StaticResource ChartLegend}"
PaletteBrushesRepeat="False" TitleStyle="{StaticResource ChartTitleLarge}" Cursor="Hand" >
<telerik:RadChart.DefaultView>
<telerik:ChartDefaultView>
<telerik:ChartDefaultView.ChartArea>
<telerik:ChartArea Cursor="Hand" />
</telerik:ChartDefaultView.ChartArea>
</telerik:ChartDefaultView>
</telerik:RadChart.DefaultView>
</telerik:RadChart>
And I also tried it with MouseEnter and MouseLeave event handlers:
private void rctChart_MouseEnter(object sender, MouseEventArgs e)
{
RadChart ct = sender as RadChart;
if (ct != null)
{
ct.Cursor = Cursors.Hand;
ct.DefaultView.ChartArea.Cursor = Cursors.Hand;
}
}
private void rctChart_MouseLeave(object sender, MouseEventArgs e)
{
RadChart ct = sender as RadChart;
if (ct != null)
{
ct.Cursor = Cursors.Arrow;
ct.DefaultView.ChartArea.Cursor = Cursors.Arrow;
}
}