Exemplo n.º 1
0
        private void InitAlignment()
        {
            AlignmentTestBlock = new UniversalBlock();
            AlignmentTestBlock.HMembers.Children.Add("Layout test");

            // configuration buttons
            Alignment                          = new ButtonBlock("Alignment: LeftOrTopEdge");
            OrientationButton                  = new ButtonBlock("Orientation: Vertical");
            Alignment.MyButton.Pushed         += Alignment_Pushed;
            OrientationButton.MyButton.Pushed += Orientation_Pushed;

            // ===============================================
            // init layout and set preferred properties
            // ===============================================

            layoutTest = new LayoutTestBlock();
            layout     = layoutTest.LinearLayoutStrategy;

            layout.Orientation = OrientationType.Vertical;
            layout.Alignment   = AlignmentType.LeftOrTopEdge;
            layout.XSpacing    = 24;
            layout.YSpacing    = 24;
            layout.WrapMaxSize = 950;
            layoutTest.MyControl.Box.Padding.SetLeftAndRight(16);
            layoutTest.MyControl.Box.Padding.SetTopAndBottom(32);

            layoutTest.MyControl.Layout();

            // ===============================================

            AlignmentTestBlock.VMembers.Children.Add(Alignment);
            AlignmentTestBlock.VMembers.Children.Add(OrientationButton);
            AlignmentTestBlock.VMembers.Children.Add(layoutTest);

            this.Children.Add(AlignmentTestBlock);
        }
Exemplo n.º 2
0
 public LinearContainerControl(ILinearLayout layout)
     : base()
 {
     this.LinearLayoutStrategy = layout;
     Init();
 }
Exemplo n.º 3
0
 public LinearContainerControl(ILinearLayout layout)
     : base()
 {
     this.LinearLayoutStrategy = layout;
     Init();
 }
Exemplo n.º 4
0
 protected virtual void InitLayoutStrategy()
 {
     this.LinearLayoutStrategy = new LinearLayout(OrientationType.Vertical);
 }
Exemplo n.º 5
0
        private void InitAlignment()
        {
            AlignmentTestBlock = new UniversalBlock();
            AlignmentTestBlock.HMembers.Children.Add("Layout test");

            // configuration buttons
            Alignment = new ButtonBlock("Alignment: LeftOrTopEdge");
            OrientationButton = new ButtonBlock("Orientation: Vertical");
            Alignment.MyButton.Pushed += Alignment_Pushed;
            OrientationButton.MyButton.Pushed += Orientation_Pushed;

            // ===============================================
            // init layout and set preferred properties
            // ===============================================

            layoutTest = new LayoutTestBlock();
            layout = layoutTest.LinearLayoutStrategy;

            layout.Orientation = OrientationType.Vertical;
            layout.Alignment = AlignmentType.LeftOrTopEdge;
            layout.XSpacing = 24;
            layout.YSpacing = 24;
            layout.WrapMaxSize = 950;
            layoutTest.MyControl.Box.Padding.SetLeftAndRight(16);
            layoutTest.MyControl.Box.Padding.SetTopAndBottom(32);

            layoutTest.MyControl.Layout();

            // ===============================================

            AlignmentTestBlock.VMembers.Children.Add(Alignment);
            AlignmentTestBlock.VMembers.Children.Add(OrientationButton);
            AlignmentTestBlock.VMembers.Children.Add(layoutTest);

            this.Children.Add(AlignmentTestBlock);
        }