How to make a Preview Mesh Edges Toggle Button?

Preview Mesh Edges is an option on the main top menu under Display to hide/show mesh edges. And since it “catches a few users out, thinking that the Meshing of the Object has failed.” I wish to make a boolean toggle button to hide/show the mesh edges.
Is this possible?

This works:
2019-05-27%2017_17_04-Window

 private void RunScript(bool x)
  {
    Grasshopper.CentralSettings.PreviewMeshEdges = x;
  }
3 Likes

Ctrl+M is the shortcut.

3 Likes