static Form1()
 {
     using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("XtraDiagram.CreateCustomContainers.CustomContainers.xml")) {
         containerDescriptions = ShapeDescriptions.LoadDescriptionsFromXml(stream).OfType <ContainerShapeDescription>().ToArray();
     }
     DiagramContainerGalleryRegistrator.RegisterContainerShapes(containerDescriptions);
 }
        static MainWindow()
        {
            var customContainersDictionary = new ResourceDictionary()
            {
                Source = new Uri("CustomContainers.xaml", UriKind.Relative)
            };

            containerDescriptions = ShapeDescriptions.LoadDescriptionsFromDictionary(customContainersDictionary).OfType <ContainerShapeDescription>().ToArray();
            DiagramContainerGalleryRegistrator.RegisterContainerShapes(containerDescriptions);
        }