コード例 #1
0
        Control LeftPane()
        {
            var layout = new DynamicLayout {
                DefaultSpacing = new Size(5, 5)
            };

            layout.BeginVertical();
            layout.BeginHorizontal();
            layout.Add(new Label {
                Text = "Label", VerticalAlignment = VerticalAlignment.Center
            });
            layout.AddCentered(new Button {
                Text = "Button"
            });
            layout.AddCentered(new LinkButton {
                Text = "LinkButton"
            });
            layout.Add(new Label {
                Text = "ImageView", VerticalAlignment = VerticalAlignment.Center
            });
            layout.Add(new ImageView {
                Image = icon1, Size = new Size(64, 64)
            });
            layout.Add(null);
            layout.EndHorizontal();

            layout.EndBeginVertical();

            layout.AddSeparateRow(new CheckBox {
                Text = "CheckBox", ThreeState = true
            }, RadioButtons(), null);
            layout.AddSeparateRow(new TextBox {
                Text = "TextBox", Size = new Size(150, -1)
            }, "PasswordBox", new PasswordBox {
                Text = "PasswordBox", Size = new Size(150, -1)
            }, null);
            layout.AddSeparateRow(DropDown(), ComboBox(), null);
            layout.AddSeparateRow("Stepper", new Stepper(), "NumericStepper", new NumericStepper {
                Value = 50, DecimalPlaces = 1
            }, new TextStepper {
                Text = "TextStepper"
            }, null);

            layout.BeginVertical();
            layout.BeginHorizontal();
            layout.BeginVertical();
            layout.AddSeparateRow("DateTimePicker", new DateTimePicker {
                Value = DateTime.Now
            }, null);
            layout.AddSeparateRow(new TextArea {
                Text = "TextArea", Size = new Size(150, 50)
            }, CreateRichTextArea(), null);
            layout.AddSeparateRow(ListBox(), new GroupBox {
                Text = "GroupBox", Content = new Label {
                    Text = "I'm in a group box"
                }
            }, null);
            layout.EndVertical();
            layout.AddSeparateColumn("Calendar", new Calendar(), null);
            layout.EndHorizontal();
            layout.EndVertical();

            layout.AddSeparateRow("Slider", new Slider {
                Value = 50, TickFrequency = 10
            });
            layout.AddSeparateRow("ProgressBar", new ProgressBar {
                Value = 25, Width = 100
            }, "Spinner", new Spinner {
                Enabled = true
            }, null);
            layout.EndVertical();

            layout.EndVertical();
            layout.Add(null);

            return(layout);
        }