private static void ExportContainerShape(RadDiagramContainerShape container, Rect enclosingBounds, RadFixedPage page)
        {
            var bounds = new Rect(container.Bounds.X - enclosingBounds.X, container.Bounds.Y - enclosingBounds.Y, container.Bounds.Width, container.Bounds.Height);

            var transformGroup = new TransformGroup();

            transformGroup.Children.Add(new RotateTransform()
            {
                Angle = container.RotationAngle, CenterX = bounds.Width / 2, CenterY = bounds.Height / 2
            });
            transformGroup.Children.Add(new TranslateTransform()
            {
                X = bounds.X, Y = bounds.Y
            });

            var position = new MatrixPosition(transformGroup.Value);

            FixedContentEditor containerEditor = CreateEditor(new EditorInfo(page, position, container, bounds, container.BorderBrush, container.RotationAngle), true);

            containerEditor.DrawRectangle(new Rect(new Point(), bounds.ToSize()));

            containerEditor.GraphicProperties.StrokeThickness = 0.5;
            var headerHeight = container.ContentBounds.Y - container.Bounds.Y - DiagramConstants.ContainerMargin;

            containerEditor.DrawRectangle(new Rect(new Point(0, headerHeight), new Size(bounds.Width, 0.5)));

            if (container.IsCollapsible)
            {
                var buttonTop  = headerHeight / 2 - 2.5;
                var buttonLeft = bounds.Width - 20;
                if (container.IsCollapsed)
                {
                    containerEditor.DrawLine(new Point(buttonLeft, buttonTop), new Point(buttonLeft + 4, buttonTop + 4));
                    containerEditor.DrawLine(new Point(buttonLeft + 4, buttonTop + 4), new Point(buttonLeft + 8, buttonTop));
                    if (container.CollapsedContent != null)
                    {
                        var contentHeight = container.ActualHeight - headerHeight;
                        ExportContent(container, bounds, container.RotationAngle, page, (s) => { return(new Point(bounds.Center().X - s.Width / 2, bounds.Bottom - contentHeight / 2 - s.Height / 2)); }, container.CollapsedContent.ToString());
                    }
                }
                else
                {
                    containerEditor.DrawLine(new Point(buttonLeft, buttonTop + 4), new Point(buttonLeft + 4, buttonTop));
                    containerEditor.DrawLine(new Point(buttonLeft + 4, buttonTop), new Point(buttonLeft + 8, buttonTop + 4));
                }
            }

            if (container.Content != null)
            {
                ExportContent(container, bounds, container.RotationAngle, page, (s) => { return(new Point(bounds.Center().X - s.Width / 2, bounds.Top + headerHeight / 2 - s.Height / 2)); });
            }
        }
 private static void DrawBarLine(FixedContentEditor editor, double offsetX, double offsetY, double width)
 {
     editor.GraphicProperties.FillColor = RgbColors.Black;
     editor.GraphicProperties.StrokeThickness = 1;
     editor.GraphicProperties.IsFilled = false;
     editor.GraphicProperties.IsStroked = true;
     editor.DrawLine(new Point(offsetX, offsetY), new Point(offsetX + width, offsetY));
 }