public XRControl[] Restore(string categoryName, string templateName)
        {
            TemplateLayoutItem item = templates.Where(x => x.Category == categoryName && x.Name == templateName).FirstOrDefault();

            byte[] layout = item != null ? item.LayoutBytes : new byte[0];
            return(DeserializeControls(layout));
        }
        public void Store(string categoryName, string templateName, XRControl[] controls)
        {
            byte[]             templateLayout = SerializeControls(controls);
            TemplateLayoutItem item           = templates.Where(x => x.Category == categoryName && x.Name == templateName).FirstOrDefault();

            if (item == null)
            {
                templates.Add(new TemplateLayoutItem()
                {
                    Name = templateName, Category = categoryName, LayoutBytes = templateLayout
                });
            }
        }
        public void DeleteTemplate(string categoryName, string templateName)
        {
            TemplateLayoutItem item = templates.Where(x => x.Category == categoryName && x.Name == templateName).FirstOrDefault();

            templates.Remove(item);
        }