本文整理汇总了C#中Eto.Forms.DynamicLayout.EndBeginHorizontal方法的典型用法代码示例。如果您正苦于以下问题:C# DynamicLayout.EndBeginHorizontal方法的具体用法?C# DynamicLayout.EndBeginHorizontal怎么用?C# DynamicLayout.EndBeginHorizontal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Eto.Forms.DynamicLayout
的用法示例。
在下文中一共展示了DynamicLayout.EndBeginHorizontal方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
void Init()
{
//_textBoxUrl
_textBoxUrl = new TextBox();
//_buttonReadFile
_buttonReadFile = new Button { Text = StrRes.GetString("StrLoad", "Load") };
_buttonReadFile.Click += _buttonReadFile_Click;
//_buttonSaveFile
_buttonSaveFile = new Button {Text = StrRes.GetString("StrSave","Save")};
_buttonSaveFile.Click += _buttonSaveFile_Click;
//_textAreaBody
_textAreaBody = new TextArea();
var layout = new DynamicLayout { Padding = new Padding(5, 5), Spacing = new Size(5, 5) };
layout.BeginVertical();
layout.BeginHorizontal();
layout.AddCentered(_textBoxUrl, xscale: true, horizontalCenter: false);
layout.AddCentered(_buttonReadFile, horizontalCenter: false);
layout.AddCentered(_buttonSaveFile, horizontalCenter: false);
layout.EndBeginHorizontal();
layout.EndVertical();
layout.AddRow(_textAreaBody);
Content = layout;
}
示例2: CreateViews
Control CreateViews(Image image)
{
var layout = new DynamicLayout();
layout.BeginHorizontal();
layout.Add("ImageView");
layout.AddAutoSized(new ImageView { Image = image });
layout.AddAutoSized(new ImageView { Image = image, Size = new Size(64, 64) });
layout.AddAutoSized(new ImageView { Image = image, Size = new Size(32, 32) });
layout.EndBeginHorizontal();
layout.Add("Drawable");
layout.AddAutoSized(new DrawableImageView { Image = image });
layout.AddAutoSized(new DrawableImageView { Image = image, MinimumSize = new Size(64, 64), ScaleImage = true });
layout.AddAutoSized(new DrawableImageView { Image = image, MinimumSize = new Size(32, 32), ScaleImage = true });
layout.EndBeginHorizontal();
layout.Add("Button");
layout.AddAutoSized(new Button { Image = image, Text = "Auto Size" });
layout.AddAutoSized(new Button { Image = image, Text = "64px Height", Height = 64 });
layout.AddAutoSized(new Button { Image = image, Text = "32px Height", Height = 32 });
layout.EndBeginHorizontal();
layout.EndHorizontal();
return layout;
}
示例3: Init
void Init()
{
//_textBoxUrl
_textBoxUrl = new TextBox();
//_buttonReadFile
_buttonReadFile = new Button { Text = StrRes.GetString("StrLoad", "Load") };
_buttonReadFile.Click += _buttonReadFile_Click;
//_buttonSaveFile
_buttonSaveFile = new Button {Text = StrRes.GetString("StrSave","Save")};
_buttonSaveFile.Click += _buttonSaveFile_Click;
//_textAreaBody
_textAreaBody = new TextArea();
//rightMenu_Body
var rightMenuBody = new ContextMenu();
var findCommand = new Command
{
MenuText = StrRes.GetString("StrFind", "Find"),
Shortcut = Keys.F | Application.Instance.CommonModifier
};
findCommand.Executed += findCommand_Executed;
rightMenuBody.Items.Add(findCommand);
var layout = new DynamicLayout { Padding = new Padding(5, 5), Spacing = new Size(5, 5) };
layout.BeginVertical();
layout.BeginHorizontal();
layout.AddCentered(_textBoxUrl, xscale: true, horizontalCenter: false);
layout.AddCentered(_buttonReadFile, horizontalCenter: false);
layout.AddCentered(_buttonSaveFile, horizontalCenter: false);
layout.EndBeginHorizontal();
layout.EndVertical();
layout.AddRow(_textAreaBody);
// bug in gtk2
layout.ContextMenu = rightMenuBody;
layout.MouseUp += (sender, e) =>
{
if (e.Buttons == MouseButtons.Alternate)
{
layout.ContextMenu.Show(_textAreaBody);
}
};
Content = layout;
}