Jump to content
Software FX Community

rags

Members
  • Posts

    1
  • Joined

  • Last visited

rags's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, After moving to ChartFx 8 from 7, we are having trouble with customizing context menu in the chart. With CFX7, we were able to get the commands of the context menu (Chartfx) and add it to our custom ContextMenuStrip. Then handle the event (ex : Color selection, Point labels) by using the following code. With CFX8, the command CommandsEventArgs, ICommandCollection does not exist anymore. Also noticed that "Chart.UpdateContextMenu" is no longer supported. So my question is what are the replacement APIs for these in CFX8? If there is none, what is the best way to call these internal commands from our context menu. Thanks Rag private void ContextMenu_PerformChartFXCommand(object sender, EventArgs e) { ToolStripItem item = sender as ToolStripItem; CommandInfo commandInfo = (CommandInfo)item.Tag; CommandsEventArgs eventArgs = new CommandsEventArgs(commandInfo.CommandId, commandInfo.SubCommandId); eventArgs.uiObject = commandInfo.UiObject; (this.Chart.Commands as ICommandCollection).OnCommandEvent(eventArgs); if (item is ToolStripMenuItem) { (item as ToolStripMenuItem).Checked = this.Chart.Commands[commandInfo.CommandId].Checked; }
×
×
  • Create New...