I've got a context menu in a grid where I want to conditionally display the items. The menu is partially generated at runtime, and I can't just rebuild it when needed. I created a separator BarItem like so:
separatorItem = new BarItem("-");
In order to hide the item from the menu, I tried setting separatorItem.Visible to false, but the item still shows.