当前位置: 首页>>代码示例>>C#>>正文


C# DynamicLayout.EndHorizontal方法代码示例

本文整理汇总了C#中Eto.Forms.DynamicLayout.EndHorizontal方法的典型用法代码示例。如果您正苦于以下问题:C# DynamicLayout.EndHorizontal方法的具体用法?C# DynamicLayout.EndHorizontal怎么用?C# DynamicLayout.EndHorizontal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Eto.Forms.DynamicLayout的用法示例。


在下文中一共展示了DynamicLayout.EndHorizontal方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TreeViewSection

		public TreeViewSection()
		{
			var layout = new DynamicLayout();
			
			layout.BeginHorizontal();
			layout.Add(new Label());
			layout.BeginVertical();
			layout.BeginHorizontal();
			layout.Add(null);
			layout.Add(allowExpanding = new CheckBox{ Text = "Allow Expanding", Checked = true });
			layout.Add(allowCollapsing = new CheckBox{ Text = "Allow Collapsing", Checked = true });
			layout.Add(RefreshButton());
			layout.Add(null);
			layout.EndHorizontal();
			layout.EndVertical();
			layout.EndHorizontal();

			treeView = ImagesAndMenu();

			layout.AddRow(new Label{ Text = "Simple" }, Default());
			layout.BeginHorizontal();
			layout.Add(new Panel());
			layout.BeginVertical();
			layout.AddSeparateRow(InsertButton(), AddChildButton(), RemoveButton(), ExpandButton(), CollapseButton(), null);
			layout.AddSeparateRow(LabelEditCheck(), EnabledCheck(), null);
			layout.EndVertical();
			layout.EndHorizontal();
			layout.AddRow(new Label{ Text = "With Images\n&& Context Menu" }, treeView);
			layout.AddRow(new Panel(), HoverNodeLabel());

			layout.Add(null, false, true);

			Content = layout;
		}
开发者ID:alexandrebaker,项目名称:Eto,代码行数:34,代码来源:TreeViewSection.cs

示例2: TestProperties

		Control TestProperties()
		{
			var layout = new DynamicLayout();
			DateTimePicker min, max, current, setValue;
			Button setButton;

			layout.AddRow(new Label { Text = "Min Value" }, min = new DateTimePicker());
			layout.AddRow(new Label { Text = "Max Value" }, max = new DateTimePicker());
			layout.BeginHorizontal();
			layout.Add(new Label { Text = "Set to value" });
			layout.BeginVertical();
			layout.BeginHorizontal();
			layout.AddAutoSized(setValue = new DateTimePicker());
			layout.Add(setButton = new Button { Text = "Set" });
			layout.EndHorizontal();
			layout.EndVertical();
			layout.EndHorizontal();
			layout.AddRow(new Label { Text = "Value" }, current = new DateTimePicker());

			min.ValueChanged += (sender, e) => current.MinDate = min.Value ?? DateTime.MinValue;
			max.ValueChanged += (sender, e) => current.MaxDate = max.Value ?? DateTime.MaxValue;
			setButton.Click += (sender, e) => current.Value = setValue.Value;
			LogEvents(current);

			return layout;
		}
开发者ID:alexandrebaker,项目名称:Eto,代码行数:26,代码来源:DateTimePickerSection.cs

示例3: TreeGridViewSection

		public TreeGridViewSection()
		{
			var layout = new DynamicLayout();
		
			layout.BeginHorizontal();
			layout.Add(new Label());
			layout.BeginVertical();
			layout.BeginHorizontal();
			layout.Add(null);
			layout.Add(allowExpanding = new CheckBox{ Text = "Allow Expanding", Checked = true });
			layout.Add(allowCollapsing = new CheckBox{ Text = "Allow Collapsing", Checked = true });
			layout.Add(null);
			layout.EndHorizontal();
			layout.EndVertical();
			layout.EndHorizontal();
			
			layout.AddRow(new Label{ Text = "Simple" }, Default());
			
			layout.AddRow(new Label{ Text = "With Images\n&& Context Menu" }, ImagesAndMenu());
			layout.AddRow(new Label{ Text = "Disabled" }, Disabled());
			
			layout.Add(null, false, true);

			Content = layout;
		}
开发者ID:Exe0,项目名称:Eto,代码行数:25,代码来源:TreeGridViewSection.cs

示例4: TestProperties

		Control TestProperties()
		{
			var layout = new DynamicLayout { DefaultSpacing = new Size(5, 5) };
			DateTimePicker min, max, current, setValue;
			Button setButton;

			layout.AddRow("Min Value", min = new DateTimePicker());
			layout.AddRow("Max Value", max = new DateTimePicker());
			layout.BeginHorizontal();
			layout.Add("Set to value");
			layout.BeginVertical(Padding.Empty);
			layout.BeginHorizontal();
			layout.AddAutoSized(setValue = new DateTimePicker());
			layout.Add(setButton = new Button { Text = "Set" });
			layout.EndHorizontal();
			layout.EndVertical();
			layout.EndHorizontal();
			layout.AddRow("Value", current = new DateTimePicker());

			min.ValueChanged += (sender, e) => current.MinDate = min.Value ?? DateTime.MinValue;
			max.ValueChanged += (sender, e) => current.MaxDate = max.Value ?? DateTime.MaxValue;
			setButton.Click += (sender, e) => current.Value = setValue.Value;
			LogEvents(current);

			return layout;
		}
开发者ID:mhusen,项目名称:Eto,代码行数:26,代码来源:DateTimePickerSection.cs

示例5: PrintDialogSection

		public PrintDialogSection()
		{
			this.DataContext = settings;

			var layout = new DynamicLayout { DefaultSpacing = new Size(5, 5), Padding = new Padding(10) };

			layout.BeginVertical();
			layout.BeginHorizontal();
			layout.Add(null);
			layout.BeginVertical(Padding.Empty);
			layout.AddSeparateRow(null, ShowPrintDialog(), null);
			layout.AddSeparateRow(null, PrintFromGraphicsWithDialog(), null);
			layout.AddSeparateRow(null, PrintFromGraphics(), null);
			layout.EndBeginVertical();
			layout.Add(PrintDialogOptions());
			layout.Add(null);
			layout.EndVertical();
			layout.Add(null);
			layout.EndHorizontal();
			layout.EndVertical();
			layout.AddSeparateRow(null, PageRange(), Settings(), null);

			layout.Add(null);
			Content = layout;
		}
开发者ID:GilbertoBotaro,项目名称:Eto,代码行数:25,代码来源:PrintDialogSection.cs

示例6: GridViewSection

		public GridViewSection()
		{
			var layout = new DynamicLayout();

			layout.AddRow(new Label { Text = "Default" }, Default());
			layout.AddRow(new Label { Text = "No Header,\nNon-Editable" }, NoHeader());
#if DESKTOP
			layout.BeginHorizontal();
			layout.Add(new Label { Text = "Context Menu\n&& Multi-Select\n&& Filter" });
			layout.BeginVertical();
			layout.Add(filterText = new SearchBox { PlaceholderText = "Filter" });
			var withContextMenuAndFilter = WithContextMenuAndFilter();
			layout.Add(withContextMenuAndFilter);
			layout.EndVertical();
			layout.EndHorizontal();

			var selectionGridView = Default(addItems: false);
			layout.AddRow(new Label { Text = "Selected Items" }, selectionGridView);

			// hook up selection of main grid to the selection grid
			withContextMenuAndFilter.SelectionChanged += (s, e) =>
			{
				var items = new DataStoreCollection();
				items.AddRange(withContextMenuAndFilter.SelectedItems);
				selectionGridView.DataStore = items;
			};
#endif

			Content = layout;
		}
开发者ID:Exe0,项目名称:Eto,代码行数:30,代码来源:GridViewSection.cs

示例7: MyForm

		public MyForm()
		{
			this.ClientSize = new Size(600, 400);
			this.Title = "Dynamic Layout";

			// Using a DynamicLayout for a simple table is actually a lot easier to maintain than using a TableLayout 
			// and having to specify the x/y co-ordinates for each control added.

			// 1. Create a new DynamicLayout object

			var layout = new DynamicLayout();

			// 2. Begin a horizontal row of controls

			layout.BeginHorizontal();

			// 3. Add controls for each column.  We are setting xscale to true to make each column use an equal portion
			// of the available space.

			layout.Add(new Label { Text = "First Column" }, xscale: true);
			layout.Add(new Label { Text = "Second Column" }, xscale: true);
			layout.Add(new Label { Text = "Third Column" }, xscale: true);

			// 4. End the horizontal section

			layout.EndHorizontal();

			// 5. To add a new row, begin another horizontal section and add more controls:

			layout.BeginHorizontal();
			layout.Add(new TextBox { Text = "Second Row, First Column" });
			layout.Add(new ComboBox { DataStore = new ListItemCollection { new ListItem { Text = "Second Row, Second Column" } } });
			layout.Add(new CheckBox { Text = "Second Row, Third Column" });
			layout.EndHorizontal();

			// 6. By default, the last row & column of a table expands to fill the rest of the space.  We can add one 
			// last row with nothing in it to make the space empty.  Since we are not in a horizontal group, calling 
			// Add() adds a new row.

			layout.Add(null);

			// 7. Set the content of the form to use the layout

			Content = layout;

			GenerateActions();
		}
开发者ID:JohnACarruthers,项目名称:Eto,代码行数:47,代码来源:Main.cs

示例8: AddHeaders

		static void AddHeaders(DynamicLayout layout)
		{
			layout.BeginHorizontal();
			layout.Add(null, xscale: false);
			layout.Add(new Label { Text = "Bitmap", HorizontalAlign = HorizontalAlign.Center }, xscale: true);
			layout.Add(new Label { Text = "Icon", HorizontalAlign = HorizontalAlign.Center }, xscale: true);
			layout.EndHorizontal();
		}
开发者ID:gene-l-thomas,项目名称:Eto,代码行数:8,代码来源:ImageViewSection.cs

示例9: GetWindow

		protected override Forms.Window GetWindow()
		{
			// Add splitters like this:
			// |---------------------------
			// |        |      |          |
			// |  P0    |  P2  |   P4     |
			// | -------|      |          |  <== These are on MainPanel
			// |  P1    |------|          |
			// |        |  P3  |          |
			// |---------------------------
			// |         status0..4,      |  <== These are on StatusPanel
			// ----------------------------

			Label[] status = new Label[] { new Label(), new Label(), new Label(), new Label(), new Label() };

			// Status bar
			var statusPanel = new Panel { };
			var statusLayout = new DynamicLayout(Padding.Empty, Size.Empty);
			statusLayout.BeginHorizontal();
			for (var i = 0; i < status.Length; ++i)
				statusLayout.Add(status[i], xscale: true);
			statusLayout.EndHorizontal();
			statusPanel.Content = statusLayout;

			// Splitter windows
			Panel[] p = new Panel[] { new Panel(), new Panel(), new Panel(), new Panel(), new Panel() };
			var colors = new Color[] { Colors.PaleTurquoise, Colors.Olive, Colors.NavajoWhite, Colors.Purple, Colors.Orange };
			var count = 0;
			for (var i = 0; i < p.Length; ++i)
			{
				var temp = i;
				//p[i].BackgroundColor = colors[i];
				var button = new Button { Text = "Click to update status " + i.ToString(), BackgroundColor = colors[i] };
				button.Click += (s, e) => status[temp].Text = "New count: " + (count++).ToString();
				p[i].Content = button;
			}

			var p0_1 = new Splitter { Panel1 = p[0], Panel2 = p[1], Orientation = SplitterOrientation.Vertical, Position = 200 };
			var p2_3 = new Splitter { Panel1 = p[2], Panel2 = p[3], Orientation = SplitterOrientation.Vertical, Position = 200 };
			var p01_23 = new Splitter { Panel1 = p0_1, Panel2 = p2_3, Orientation = SplitterOrientation.Horizontal, Position = 200};
			var p0123_4 = new Splitter { Panel1 = p01_23, Panel2 = p[4], Orientation = SplitterOrientation.Horizontal, Position = 400 };

			// Main panel
			var mainPanel = new Panel();
			mainPanel.Content = p0123_4;

			// Form's content
			var layout = new DynamicLayout();
			layout.Add(mainPanel, yscale: true);
			layout.Add(statusPanel);
			layout.Generate();
			var form = new Form 
			{ 
				Size = new Size(800, 600),
				Content = layout
			};
			return form;
		}
开发者ID:JohnACarruthers,项目名称:Eto,代码行数:58,代码来源:SplitterSection.cs

示例10: OnPreLoad

		protected override void OnPreLoad(EventArgs e)
		{
			var layout = new DynamicLayout { DefaultSpacing = new Size(5, 5), Padding = new Padding(10) };

			var options = CreateOptions();
			if (options != null)
				layout.Add(options);

			layout.BeginVertical();
			layout.AddRow(null, LabelControl(), ButtonControl(), new Panel(), null);
			layout.AddRow(null, TextBoxControl(), PasswordBoxControl());

			layout.BeginHorizontal();
			layout.Add(null);
			layout.Add(TextAreaControl());
			if (Platform.Supports<ListBox>())
				layout.Add(ListBoxControl());
			layout.EndHorizontal();

			layout.AddRow(null, CheckBoxControl(), RadioButtonControl());
			layout.AddRow(null, DateTimeControl(), NumericUpDownControl());
			layout.AddRow(null, DropDownControl(), ComboBoxControl());

			layout.BeginHorizontal();
			layout.Add(null);
			layout.Add(ColorPickerControl());
			if (Platform.Supports<GroupBox>())
				layout.Add(GroupBoxControl());
			layout.EndHorizontal();

			layout.AddRow(null, LinkButtonControl(), SliderControl());
			layout.AddRow(null, DrawableControl(), ImageViewControl());
			layout.EndVertical();
			layout.Add(null);

			Content = layout;

			base.OnPreLoad(e);
		}
开发者ID:mhusen,项目名称:Eto,代码行数:39,代码来源:AllControlsBase.cs

示例11: MessageBoxSection

		public MessageBoxSection()
		{
			MessageBoxText = "Some message";
			MessageBoxCaption = "Some caption";
			AttachToParent = true;

			var layout = new DynamicLayout();

			layout.AddSeparateRow(null, new Label { Text = "Caption" }, CaptionBox(), null);
			layout.AddSeparateRow(null, new Label { Text = "Text" }, TitleBox(), null);

			layout.BeginVertical(Padding.Empty);

			layout.BeginHorizontal();
			layout.Add(null);
			layout.Add(new Label { Text = "Type", VerticalAlign = VerticalAlign.Middle, HorizontalAlign = HorizontalAlign.Right });
			layout.Add(MessageBoxTypeCombo());
			layout.Add(AttachToParentCheckBox());
			layout.Add(null);
			layout.EndHorizontal();

			layout.EndBeginVertical();
			layout.BeginHorizontal();
			layout.Add(null);
			layout.Add(new Label { Text = "Buttons", VerticalAlign = VerticalAlign.Middle, HorizontalAlign = HorizontalAlign.Right });
			layout.Add(MessageBoxButtonsCombo());
			layout.Add(new Label { Text = "Default Button", VerticalAlign = VerticalAlign.Middle, HorizontalAlign = HorizontalAlign.Right });
			layout.Add(MessageBoxDefaultButtonCombo());
			layout.Add(null);
			layout.EndHorizontal();

			layout.EndVertical();

			layout.AddSeparateRow(null, ShowDialogButton(), null);
			layout.Add(null);

			Content = layout;
		}
开发者ID:Exe0,项目名称:Eto,代码行数:38,代码来源:MessageBoxSection.cs

示例12: MessageBoxSection

		public MessageBoxSection()
		{
			MessageBoxText = "Some message";
			MessageBoxCaption = "Some caption";
			AttachToParent = true;

			var layout = new DynamicLayout { DefaultSpacing = new Size(5, 5), Padding = new Padding(10) };

			layout.AddSeparateRow(null, new Label { Text = "Caption" }, CaptionBox(), null);
			layout.AddSeparateRow(null, new Label { Text = "Text" }, TitleBox(), null);

			layout.BeginVertical();

			layout.BeginHorizontal();
			layout.Add(null);
			layout.Add(new Label { Text = "Type", VerticalAlignment = VerticalAlignment.Center, TextAlignment = TextAlignment.Right });
			layout.Add(MessageBoxTypeCombo());
			layout.Add(AttachToParentCheckBox());
			layout.Add(null);
			layout.EndHorizontal();

			layout.EndBeginVertical();
			layout.BeginHorizontal();
			layout.Add(null);
			layout.Add(new Label { Text = "Buttons", VerticalAlignment = VerticalAlignment.Center, TextAlignment = TextAlignment.Right });
			layout.Add(MessageBoxButtonsCombo());
			layout.Add(new Label { Text = "Default Button", VerticalAlignment = VerticalAlignment.Center, TextAlignment = TextAlignment.Right });
			layout.Add(MessageBoxDefaultButtonCombo());
			layout.Add(null);
			layout.EndHorizontal();

			layout.EndVertical();

			layout.AddSeparateRow(null, ShowDialogButton(), null);
			layout.Add(null);

			Content = layout;
		}
开发者ID:mhusen,项目名称:Eto,代码行数:38,代码来源:MessageBoxSection.cs

示例13: SetBadgeLabel

		static Control SetBadgeLabel()
		{
			var layout = new DynamicLayout { Spacing = new Size(5, 5) };

			layout.BeginHorizontal();

			var text = new TextBox();
			var button = new Button { Text = "Set Badge Label" };
			button.Click += (sender, e) => Application.Instance.BadgeLabel = text.Text;
			layout.Add(new Label { Text = "Badge Label Text:", VerticalAlignment = VerticalAlignment.Center });
			layout.AddCentered(text);
			layout.Add(button);
			layout.EndHorizontal();

			return layout;
		}
开发者ID:mhusen,项目名称:Eto,代码行数:16,代码来源:BadgeLabelSection.cs

示例14: SetInitialValue

		Control SetInitialValue()
		{
			var layout = new DynamicLayout { DefaultSpacing = new Size(5, 5) };

			layout.BeginHorizontal();
			RadioButton controller = null;
			for (int i = 0; i < 5; i++)
			{
				var item = new RadioButton(controller) { Text = "Item " + i, Checked = i == 2 };
				controller = controller ?? item;
				LogEvents(item);
				layout.Add(item);
			}
			layout.EndHorizontal();

			return layout;
		}
开发者ID:mhusen,项目名称:Eto,代码行数:17,代码来源:RadioButtonSection.cs

示例15: Disabled

		Control Disabled()
		{
			var layout = new DynamicLayout();
			
			layout.BeginHorizontal();
			RadioButton controller = null;
			for (int i = 0; i < 5; i++)
			{
				var item = new RadioButton(controller) { Text = "Item " + i, Checked = i == 2, Enabled = false };
				controller = controller ?? item;
				LogEvents(item);
				layout.Add(item);
			}
			layout.EndHorizontal();
			
			return layout;
		}
开发者ID:gene-l-thomas,项目名称:Eto,代码行数:17,代码来源:RadioButtonSection.cs


注:本文中的Eto.Forms.DynamicLayout.EndHorizontal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。