Jump to content
Software FX Community

Dual Panes and Modifying Properties On Non-Primary Panes


Recommended Posts

I was looking into an issue from a user who had a problem with one of our charts that had two panes on it.  They were trying to modify the Y-Axis' min/max values, but could not as each time they would right click they would get the properties for the first pane (the main pane).  I looked into it and it seems the HitTest method used in the chart does not take into account the possibility of a second pane in the charts and it could be overcome pretty easily.

For now, I implemented a workaround and decided to post it so that others may be able to overcome the problem if they run into it: 

private void chtMain_InternalCommand(object sender, CommandUIEventArgs e)


  switch (e.CommandId)


  case (int)CommandId.Options:

  // In a two pane chart, we need to force the properties for the second pane.  if ((this.chtMain.Panes.Count > 1) && this.chtMain.Panes[1].BoundingRectangle.Contains(this.m_pntRightClickForMenu))


 e.Handled =

true; this.chtMain.ShowPropertiesDialog(this.chtMain.Panes[1].AxisY, 0);





 Btw, the "this.m_pntRightClickForMenu" is captured from the right click on the chart to determine where the user right clicked.  Something I would wish we could get from exposing the context menu itself, but hey a man's got to have dreams right ;-) 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...