本文整理汇总了C#中VBox类的典型用法代码示例。如果您正苦于以下问题:C# VBox类的具体用法?C# VBox怎么用?C# VBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VBox类属于命名空间,在下文中一共展示了VBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainView
public MainView(IPresenterFactory presenterFactory)
{
_notebook = presenterFactory.InstantiatePresenter<MainNotebook>();
_notebook.Add(presenterFactory.InstantiatePresenter<MenuPageView>(this));
_notebook.Add(presenterFactory.InstantiatePresenter<ModsPageView>(this));
_notebook.Add(presenterFactory.InstantiatePresenter<BlueprintsPageView>(this));
_notebook.Add(presenterFactory.InstantiatePresenter<SavegamesPageView>(this));
_notebook.Add(presenterFactory.InstantiatePresenter<TasksPageView>(this));
PackStart(presenterFactory.InstantiatePresenter<MainHeaderView>());
var sideBox = new VBox
{
MinWidth = 280,
WidthRequest = 280
};
_sidebarContainer = new SidebarContainer();
sideBox.PackStart(_sidebarContainer, true, true);
var box = new HBox();
box.PackStart(_notebook, true);
box.PackEnd(sideBox);
PackStart(box, true, true);
_notebook.HandleSizeChangeOnTabChange = true;
_notebook.HandleSizeUpdate();
}
示例2: DependenciesSectionWidget
public DependenciesSectionWidget (IConfigurationSection section)
{
this.section = section;
widget = new VBox ();
if (this.section.Service.Dependencies.Length == 0) {
widget.PackStart (new Label { Text = GettextCatalog.GetString ("This service has no dependencies") });
return;
}
bool firstCategory = true;
foreach (var category in this.section.Service.Dependencies.Select (d => d.Category).Distinct ()) {
var categoryIcon = new ImageView (category.Icon.WithSize (IconSize.Small));
var categoryLabel = new Label (category.Name);
var categoryBox = new HBox ();
if (!firstCategory)
categoryBox.MarginTop += 5;
categoryBox.PackStart (categoryIcon);
categoryBox.PackStart (categoryLabel);
widget.PackStart (categoryBox);
foreach (var dependency in this.section.Service.Dependencies.Where (d => d.Category == category)) {
widget.PackStart (new DependencyWidget (section.Service, dependency) {
MarginLeft = category.Icon.Size.Width / 2
});
}
if (firstCategory)
firstCategory = false;
}
}
示例3: SpecialWidget
public SpecialWidget ()
{
VBox bl = new VBox () { Spacing = 0 };
bl.BackgroundColor = Colors.Gray;
bl.PackStart (new Label ("Hi there"));
Content = bl;
}
示例4: InitializeComponent
private void InitializeComponent()
{
Width = 550;
Height = 600;
//Location = WindowLocation.CenterScreen;
vbox2 = new VBox();
vbox2.Visible = true;
vbox2.Spacing = 3;
notebook1 = new Notebook();
notebook1.Visible = true;
notebook1.CanGetFocus = true;
image1 = new ImageView();
string file = FileHelper.FindSupportFile("bygfoot_splash.png", false);
image1.Image = Image.FromFile(file);
treeview_splash_contributors = new TreeView();
scrolledwindow2 = new ScrollView();
scrolledwindow2.Content = treeview_splash_contributors;
notebook1.Add(image1, "");
notebook1.Add(scrolledwindow2, "");
vbox2.PackStart(notebook1);
Content = vbox2;
}
示例5: GenerateFrameContents
VBox GenerateFrameContents (bool useMnemonics)
{
var statusText = useMnemonics ? "with mnemonic" : "without mnemonic";
var vbox = new VBox ();
var button = new Button ("_Button");
button.UseMnemonic = useMnemonics;
button.Clicked += (sender, e) => MessageDialog.ShowMessage (string.Format ("Button {0} clicked.", statusText));
vbox.PackStart (button);
var toggleButton = new ToggleButton ("_Toggle Button");
toggleButton.UseMnemonic = useMnemonics;
toggleButton.Clicked += (sender, e) => MessageDialog.ShowMessage (string.Format ("Toggle Button {0} clicked.", statusText));
vbox.PackStart (toggleButton);
var menuButton = new MenuButton ("_Menu Button");
menuButton.UseMnemonic = useMnemonics;
menuButton.Label = "_Menu Button";
var firstMenuItem = new MenuItem ("_First");
firstMenuItem.UseMnemonic = useMnemonics;
firstMenuItem.Clicked += (sender, e) => MessageDialog.ShowMessage (string.Format ("First Menu Item {0} clicked.", statusText));
var secondMenuItem = new MenuItem ("_Second");
secondMenuItem.UseMnemonic = useMnemonics;
secondMenuItem.Clicked += (sender, e) => MessageDialog.ShowMessage (string.Format ("Second Menu Item {0} clicked.", statusText));
var menu = new Menu ();
menu.Items.Add (firstMenuItem);
menu.Items.Add (secondMenuItem);
menuButton.Menu = menu;
vbox.PackStart (menuButton);
return vbox;
}
示例6: RadioButtonSample
public RadioButtonSample ()
{
var b1 = new RadioButton ("Item 1");
var b2 = new RadioButton ("Item 2 (red background)");
b2.BackgroundColor = Xwt.Drawing.Colors.Red;
var b3 = new RadioButton ("Item 3");
b2.Group = b3.Group = b1.Group;
PackStart (b1);
PackStart (b2);
PackStart (b3);
var la = new Label ();
la.Hide ();
b1.Group.ActiveRadioButtonChanged += delegate {
la.Show ();
la.Text = "Active: " + b1.Group.ActiveRadioButton.Label;
};
PackStart (la);
PackStart (new HSeparator ());
var box = new VBox ();
box.PackStart (new Label ("First Option"));
box.PackStart (new Label ("Second line"));
var b4 = new RadioButton (box);
var b5 = new RadioButton ("Second Option");
var b6 = new RadioButton ("Disabled Option") { Sensitive = false };
PackStart (b4);
PackStart (b5);
PackStart (b6);
b4.Group = b5.Group = b6.Group;
}
示例7: InitializeComponent
private void InitializeComponent()
{
vbox28 = new VBox();
this.Width = 300;
//this.Location = WindowLocation.CenterParent;
}
示例8: RadioButtonSample
public RadioButtonSample()
{
var b1 = new RadioButton ("Item 1");
var b2 = new RadioButton ("Item 2");
var b3 = new RadioButton ("Item 3");
b2.Group = b3.Group = b1.Group;
PackStart (b1);
PackStart (b2);
PackStart (b3);
var la = new Label ();
la.Hide ();
b1.Group.ActiveRadioButtonChanged += delegate {
la.Show ();
la.Text = "Active: " + b1.Group.ActiveRadioButton.Label;
};
PackStart (la);
PackStart (new HSeparator ());
var box = new VBox ();
box.PackStart (new Label ("First Option"));
box.PackStart (new Label ("Second line"));
var b4 = new RadioButton (box);
var b5 = new RadioButton ("Second Option");
PackStart (b4);
PackStart (b5);
b4.Group = b5.Group;
}
示例9: Build
private void Build()
{
this.Icon = Xwt.Drawing.Image.FromResource("URMSimulator.Resources.urm.png");
this.Title = "About";
this.Resizable = false;
this.Buttons.Add(new DialogButton(Command.Close));
vbox1 = new VBox();
image1 = new ImageView();
image1.WidthRequest = 320;
image1.HeightRequest = 270;
vbox1.PackStart(image1);
labelProgramName = new Label();
labelProgramName.TextAlignment = Alignment.Center;
vbox1.PackStart(labelProgramName);
labelComments = new Label();
labelComments.TextAlignment = Alignment.Center;
vbox1.PackStart(labelComments);
hbox1 = new HBox();
hbox1.PackStart(new HBox(), true);
labelWebsite = new LinkLabel();
labelWebsite.TextAlignment = Alignment.Center; //text aligment doesn't work with Xwt.WPF
hbox1.PackStart(labelWebsite, false);
hbox1.PackStart(new HBox(), true);
vbox1.PackStart(hbox1);
this.Content = vbox1;
}
示例10: ReliefFrameSample
public ReliefFrameSample()
{
var box = new VBox ();
box.PackStart (new ReliefFrame (new Button ("Hello")));
box.PackStart (new ReliefFrame (new Button ("World")));
PackStart (box);
}
示例11: LauncherWindow
public LauncherWindow()
{
this.Title = "TrueCraft Launcher";
this.Width = 1200;
this.Height = 576;
this.User = new TrueCraftUser();
MainContainer = new HBox();
WebScrollView = new ScrollView();
WebView = new WebView("http://truecraft.io/updates");
LoginView = new LoginView(this);
OptionView = new OptionView(this);
MultiplayerView = new MultiplayerView(this);
SingleplayerView = new SingleplayerView(this);
InteractionBox = new VBox();
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("TrueCraft.Launcher.Content.truecraft_logo.svg"))
TrueCraftLogoImage = new ImageView(Image.FromStream(stream));
WebScrollView.Content = WebView;
MainContainer.PackStart(WebScrollView, true);
InteractionBox.PackStart(TrueCraftLogoImage);
InteractionBox.PackEnd(LoginView);
MainContainer.PackEnd(InteractionBox);
this.Content = MainContainer;
}
示例12: MyTestWidget
public MyTestWidget()
{
PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" });
PackStart(new Label("Scrollable Test:"));
VBox ContentData = new VBox()
{
ExpandHorizontal = true,
ExpandVertical = true
};
ScrollView ContentScroll = new ScrollView()
{
Content = ContentData,
ExpandHorizontal = true,
ExpandVertical = true
};
PackStart(ContentScroll, true, true);
ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
ContentData.PackStart(new TextEntry(), true, true);
ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
ContentData.PackStart(new TextEntry(), true, true);
ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
ContentData.PackStart(new MyWidget(), true, true);
ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
ContentData.PackStart(new TextEntry(), true, true);
ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
ContentData.PackStart(new TextEntry(), true, true);
ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
ContentData.PackStart(new TextEntry(), true, true);
}
示例13: BuildGui
void BuildGui()
{
this.Title = GettextCatalog.GetString("Select Work Item");
VBox content = new VBox();
HBox mainBox = new HBox();
queryView.Columns.Add(new ListViewColumn(string.Empty, new TextCellView(titleField)));
queryView.DataSource = queryStore;
queryView.WidthRequest = 200;
BuildQueryView();
mainBox.PackStart(queryView);
workItemList.WidthRequest = 400;
workItemList.HeightRequest = 400;
workItemList.ShowCheckboxes = true;
mainBox.PackStart(workItemList, true, true);
content.PackStart(mainBox, true, true);
HBox buttonBox = new HBox();
Button okButton = new Button(GettextCatalog.GetString("Ok"));
okButton.WidthRequest = Constants.ButtonWidth;
okButton.Clicked += (sender, e) => Respond(Command.Ok);
buttonBox.PackEnd(okButton);
content.PackStart(buttonBox);
//this.Resizable = false;
this.Content = content;
AttachEvents();
}
示例14: DialogWidget
public DialogWidget(params object[]data)
: base()
{
box = new VBox ();
actionArea = new HButtonBox ();
actionArea.LayoutStyle = ButtonBoxStyle.End;
buttons = new Button[data.Length / 2];
response_ids = new int[data.Length / 2];
for (int i = 0; i < data.Length; i += 2)
{
Button button =
new Button (data[i] as
string);
button.Clicked += OnClicked;
actionArea.PackStart (button,
false,
false, 4);
buttons[i / 2] = button;
response_ids[i / 2] =
(int) data[i + 1];
}
PackStart (box, true, true, 4);
PackStart (actionArea, false, true, 4);
ShowAll ();
}
示例15: Splash
public Splash()
{
Decorated = false;
ShowInTaskbar = false;
box = new VBox {
Margin = -2,
};
imageView = new ImageView {
Image = Image.FromResource (Resources.Splash),
};
progressBar = new ProgressBar {
Indeterminate = true,
TooltipText = Catalog.GetString ("Loading..."),
};
info = new Label {
Text = Catalog.GetString ("Loading..."),
TextAlignment = Alignment.Center,
};
box.PackStart (imageView);
box.PackEnd (progressBar);
box.PackEnd (info);
Content = box;
InitialLocation = WindowLocation.CenterScreen;
}