btnShowOrHideAllGraphElements_Click
(
object sender,
RibbonControlEventArgs e
)
{
AssertValid();
// This method handles the Click event for two buttons. The buttons
// are distinguished by their Boolean Tags, which specify true to show
// or false to hide.
Debug.Assert(sender is RibbonButton);
RibbonButton oButton = (RibbonButton)sender;
Debug.Assert(oButton.Tag is Boolean);
Boolean bShow = (Boolean)oButton.Tag;
chkReadVertexLabels.Checked = chkReadEdgeLabels.Checked
= chkReadGroupLabels.Checked = this.ShowGraphLegend
= this.ShowGraphAxes = bShow;
}