本文整理汇总了C#中Panel.SetStyle方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.SetStyle方法的具体用法?C# Panel.SetStyle怎么用?C# Panel.SetStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Panel
的用法示例。
在下文中一共展示了Panel.SetStyle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddPanel
private void AddPanel()
{
_panel = new Panel
{
SkinClass = typeof(PanelSkin4),
Title = "Panel " + _count,
MinWidth = 200,
MinHeight = 300
};
_panel.SetStyle("headerBackgroundRollOverColor", Color.cyan);
_hgroup.AddChild(_panel);
_count++;
}
示例2: CreateChildren
protected override void CreateChildren()
{
base.CreateChildren();
#region Heading
TitleLabel button = new TitleLabel
{
StyleName = "title",
HorizontalCenter = 0,
Top = 20
};
AddChild(button);
new TextRotator
{
Delay = 5, // 5 seconds delay
Lines = new[]
{
"Drag and Drop Demo 2",
"Created using eDriven.Gui",
//"Author: Danko Kozar",
"Drag items from the left panel (source)",
"Drop them to the right panel (destination)"
},
Callback = delegate(string line) { button.Text = line; }
}
.Start();
#endregion
#region Box
_box = new Group
{
HorizontalCenter = 0, VerticalCenter = 0,
Layout = new HorizontalLayout
{
HorizontalAlign = HorizontalAlign.Center,
VerticalAlign = VerticalAlign.Top
}
};
// mandatory listeners
AddEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown); // mouse down
AddEventListener(DragEvent.DRAG_ENTER, OnDragEnter); // drag enter
AddEventListener(DragEvent.DRAG_DROP, OnDragDrop); // drag drop (on drop target)
// optional listeners
AddEventListener(DragEvent.DRAG_START, OnDragStart); // drag start(on drag initiator)
AddEventListener(DragEvent.DRAG_EXIT, OnDragExit); // drag exit (on drop target)
AddEventListener(DragEvent.DRAG_COMPLETE, OnDragComplete); // drag complete (on drag initiator)
//_box.AddEventListener(MouseEvent.MOUSE_OVER, OnMouseOver);
//_box.AddEventListener(MouseEvent.MOUSE_OUT, OnMouseOut);
//_box.AddEventListener(MouseEvent.MOUSE_UP, OnMouseUp);
AddChild(_box);
#endregion
#region Source
_pnlSource = new Panel
{
Title = "Source",
Icon = Resources.Load<Texture>("Icons/star"),
//Width = 450,
//Height = 500,
MouseEnabled = true,
SkinClass = typeof(PanelSkin2),
Layout = new TileLayout
{
Orientation = TileOrientation.Rows,
HorizontalGap = 10,
VerticalGap = 10,
RowHeight = 128 + 20, // image = 128x128, padding = 10 + 10
ColumnWidth = 128 + 20,
RequestedRowCount = 3,
RequestedColumnCount = 3
}
};
_pnlSource.SetStyle("addedEffect", _panelShowEffect);
_box.AddChild(_pnlSource);
Button btnReset = new Button
{
Text = "Reset",
SkinClass = typeof(ImageButtonSkin),
Icon = ImageLoader.Instance.Load("Icons/arrow_refresh")
};
btnReset.Press += delegate { InitChildren(); };
_pnlSource.ControlBarGroup.AddChild(btnReset);
/*Label lbl = new Label { Text = "miki" };
_pnlSource.ControlBarGroup.AddChild(lbl);*/
//.........这里部分代码省略.........