static void IndjectCustomUI(Controls.CustomUI customUI, XDocument doc) { if (customUI != null) doc.Root.Select("Product").Add(customUI.ToXElement()); }