public void RemoveFromMenu(ContextMenuElement element)
 {
     if (element.Parent != null)
     {
         List.RemoveChild(element.Parent);
         InvalidateMeasure();
     }
 }
 public void AddToMenu(ContextMenuElement element)
 {
     List.AddChild(new PanelContainer
     {
         Children      = { element },
         Margin        = new Thickness(0, 0, 0, MarginSizeBetweenElements),
         PanelOverride = new StyleBoxFlat {
             BackgroundColor = DefaultColor
         }
     });
 }