In a simple experiment, I am unable to duplicate the behavior you describe.
1. put a TreeView on a Form
2. add some Nodes
3. add a ContextMenuStrip to the Form. Add four items.
4. set the TreeView's ContextMenuStrip Property to the ContextMenuStrip
5. in the NodeMouseClick EventHandler for the TreeView:
private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
contextMenuStrip1.Items[0].Visible = (! (e.Node.Name == "Node0"));
contextMenuStrip1.Items[2].Visible = (! (e.Node.Name == "Node2"));
}
I see no blank items when I right-context-click on "Node0" or "Node2," and the up/down arrow keys work as expected.