Ejemplo n.º 1
0
        public override void AddChild(IWidget child)
        {
            base.AddChild(child);
            WidgetBaseWindowsPhone w = (WidgetBaseWindowsPhone)child;

            MoSync.Util.RunActionOnMainThreadSync(() =>
            {
                mPage.Content = w.View;
            });
        }
Ejemplo n.º 2
0
        public override void AddChild(IWidget child)
        {
            base.AddChild(child);
            MoSync.Util.RunActionOnMainThreadSync(() =>
            {
                WidgetBaseWindowsPhone widget = (child as WidgetBaseWindowsPhone);
                ColumnDefinition columnDef    = new ColumnDefinition();

                columnDef.Width = new System.Windows.GridLength(1, System.Windows.GridUnitType.Auto);
                mGrid.ColumnDefinitions.Add(columnDef);
                //@TDB
                //((System.Windows.FrameworkElement)widget.View).Margin = new Thickness(mPaddingLeft, mPaddingTop, mPaddingRight, mPaddingBottom);

                mGrid.Children.Add(widget.View);

                Grid.SetColumn((widget.View as System.Windows.FrameworkElement), mGrid.Children.Count - 1);
                Grid.SetRow((widget.View as System.Windows.FrameworkElement), 0);
            });
        }