void PackChild()
        {
            container = new Windows.UI.Xaml.Controls.Grid {
                HorizontalAlignment = Control.HorizontalAlignment, VerticalAlignment = Control.VerticalAlignment
            };
            content = new Windows.UI.Xaml.Controls.Border {
                HorizontalAlignment = Control.HorizontalAlignment, VerticalAlignment = Control.VerticalAlignment
            };
            rectangle = new Windows.UI.Xaml.Shapes.Rectangle {
                Fill = new Windows.UI.Xaml.Media.SolidColorBrush(Windows.UI.Colors.Transparent)
            };

            container.Children.Add(rectangle);
            container.Children.Add(content);
            Control.Child = (container);

            this.UpdateChild();
        }
Example #2
0
        void PackChild()
        {
            container = new Windows.UI.Xaml.Controls.Grid {
                HorizontalAlignment = Control.HorizontalAlignment, VerticalAlignment = Control.VerticalAlignment
            };
            content = new Border {
                HorizontalAlignment = Control.HorizontalAlignment, VerticalAlignment = Control.VerticalAlignment
            };

            if (Element.Content != null)
            {
                IVisualElementRenderer renderer = Element.Content.GetOrCreateRenderer();
                content.Child = (renderer.ContainerElement);
            }

            container.Children.Add(rectangle);
            container.Children.Add(content);
            Control.Child = (container);
        }