문제

I'm using Telerik's RadChartView control to draw charts in my WinForm application. One of my testers noticed that Telerik charts have some built in functionality where if you right click on the chart you get a context menu that lets you choose from Telerik's list of default color palettes.

This is a problem, because I'm using a custom color palette in my charts, and I've been told to prevent users from adjusting the color palette.

I've spent several hours reading through Telerik's documentation on RadChartView and charts, doing google searches, and adjusting different things in my RadChartView to disable the user's ability to change the color palette. But bottom line, I can't find the answer, I'm stumped.

도움이 되었습니까?

해결책

I eventually figured out the answer to this question by reading through some old help threads at Telerik's forums. Basically, you need to disable the context menu in the RadChartView altogether, below is the code to do so in VB.net.

Private Sub RemoveContextMenu(ByVal Sender As Object, ByVal e As ChartViewContextMenuOpeningEventArgs) Handles RadChartView.ContextMenuOpening
    e.ContextMenu.Dispose()
End Sub
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top