本文整理汇总了C#中Box.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Box.Show方法的具体用法?C# Box.Show怎么用?C# Box.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Box
的用法示例。
在下文中一共展示了Box.Show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DockItemContainer
public DockItemContainer (DockFrame frame, DockItem item)
{
this.item = item;
mainBox = new VBox ();
Add (mainBox);
mainBox.ResizeMode = Gtk.ResizeMode.Queue;
mainBox.Spacing = 0;
ShowAll ();
mainBox.PackStart (item.GetToolbar (PositionType.Top).Container, false, false, 0);
HBox hbox = new HBox ();
hbox.Show ();
hbox.PackStart (item.GetToolbar (PositionType.Left).Container, false, false, 0);
contentBox = new HBox ();
contentBox.Show ();
hbox.PackStart (contentBox, true, true, 0);
hbox.PackStart (item.GetToolbar (PositionType.Right).Container, false, false, 0);
mainBox.PackStart (hbox, true, true, 0);
mainBox.PackStart (item.GetToolbar (PositionType.Bottom).Container, false, false, 0);
}
示例2: DocumentToolbar
internal DocumentToolbar ()
{
box = new HBox ();
box.Spacing = 3;
box.Show ();
var al = new ToolbarBox (0, 0, 1, 1);
al.LeftPadding = 5;
al.TopPadding = 4;
al.BottomPadding = 4;
al.Add (box);
frame = al;
}
示例3: DockItemContainer
public DockItemContainer (DockFrame frame, DockItem item)
{
this.frame = frame;
this.item = item;
ResizeMode = Gtk.ResizeMode.Queue;
Spacing = 0;
title = new Gtk.Label ();
title.Xalign = 0;
title.Xpad = 3;
title.UseMarkup = true;
title.Ellipsize = Pango.EllipsizeMode.End;
btnDock = new Button (new Gtk.Image (pixAutoHide));
btnDock.Relief = ReliefStyle.None;
btnDock.CanFocus = false;
btnDock.WidthRequest = btnDock.HeightRequest = 17;
btnDock.Clicked += OnClickDock;
btnClose = new Button (new Gtk.Image (pixClose));
btnClose.TooltipText = Catalog.GetString ("Hide");
btnClose.Relief = ReliefStyle.None;
btnClose.CanFocus = false;
btnClose.WidthRequest = btnClose.HeightRequest = 17;
btnClose.Clicked += delegate {
item.Visible = false;
};
HBox box = new HBox (false, 0);
box.PackStart (title, true, true, 0);
box.PackEnd (btnClose, false, false, 0);
box.PackEnd (btnDock, false, false, 0);
headerAlign = new Alignment (0.0f, 0.0f, 1.0f, 1.0f);
headerAlign.TopPadding = headerAlign.BottomPadding = headerAlign.RightPadding = headerAlign.LeftPadding = 1;
headerAlign.Add (box);
header = new EventBox ();
header.Events |= Gdk.EventMask.KeyPressMask | Gdk.EventMask.KeyReleaseMask;
header.ButtonPressEvent += HeaderButtonPress;
header.ButtonReleaseEvent += HeaderButtonRelease;
header.MotionNotifyEvent += HeaderMotion;
header.KeyPressEvent += HeaderKeyPress;
header.KeyReleaseEvent += HeaderKeyRelease;
header.Add (headerAlign);
header.ExposeEvent += HeaderExpose;
header.Realized += delegate {
header.GdkWindow.Cursor = handCursor;
};
foreach (Widget w in new Widget [] { header, btnDock, btnClose }) {
w.EnterNotifyEvent += HeaderEnterNotify;
w.LeaveNotifyEvent += HeaderLeaveNotify;
}
PackStart (header, false, false, 0);
ShowAll ();
PackStart (item.GetToolbar (PositionType.Top).Container, false, false, 0);
HBox hbox = new HBox ();
hbox.Show ();
hbox.PackStart (item.GetToolbar (PositionType.Left).Container, false, false, 0);
contentBox = new HBox ();
contentBox.Show ();
hbox.PackStart (contentBox, true, true, 0);
hbox.PackStart (item.GetToolbar (PositionType.Right).Container, false, false, 0);
PackStart (hbox, true, true, 0);
PackStart (item.GetToolbar (PositionType.Bottom).Container, false, false, 0);
UpdateBehavior ();
}
示例4: Flip
public void Flip()
{
Box a = isVertical ? vBox : hBox;
Box b = isVertical ? hBox : vBox;
a.Removed -= HandleRemoved;
while (a.Children.Count() > 0)
{
var child = a.Children[0];
a.Remove(child);
b.Add(child);
if (child is DockItemTitleTab)
(child as DockItemTitleTab).UpdateBehavior();
}
box.Hide();
box = b;
box.Removed += HandleRemoved;
box.Show();
box.QueueDraw();
QueueResize();
var dc = Parent as DockContainer;
if (dc != null)
dc.RecalcLayout();
}