本文整理汇总了C#中Layer.SetVisible方法的典型用法代码示例。如果您正苦于以下问题:C# Layer.SetVisible方法的具体用法?C# Layer.SetVisible怎么用?C# Layer.SetVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Layer
的用法示例。
在下文中一共展示了Layer.SetVisible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowBottom
public ActionResult ShowBottom(string sender)
{
Panel p = new Panel
{
ID = "Panel2",
Title = "Panel in Layer",
Html = "Ext.Net Panel",
BodyPadding = 5,
Width = 300,
Height = 100,
Floating = true,
Shadow = false,
Tools = {
new Tool {
Type = ToolType.Close,
Handler = "App.direct.Element_Basic.Close2();"
}
}
};
p.Render(X.Body().Descriptor, RenderMode.RenderTo);
Layer layer = new Layer(new LayerConfig
{
ID = "Layer2",
ExistingElement = p.Element
});
layer.SetVisible(false, false).AlignTo(this.GetCmp<Panel>("Panel1").Element, "tl-bl", new int[] { 0, 5 }).SlideIn("t");
this.GetCmp<Button>(sender).Disabled = true;
return this.Direct();
}
示例2: ShowRight
public ActionResult ShowRight(string sender)
{
Layer layer = new Layer(new LayerConfig
{
ID = "Layer1",
DH =
{
Cls = "layer",
Children = {
new DomObject {
Children = {
new DomObject {
Tag = HtmlTextWriterTag.H3,
Html = "Hello"
},
new DomObject {
Tag = HtmlTextWriterTag.Hr
},
new DomObject {
Tag = HtmlTextWriterTag.A,
Html = "Close",
CustomConfig = {
new ConfigItem("href", "#", ParameterMode.Value),
new ConfigItem("onClick", "App.direct.Element_Basic.Close('Layer1'); return false;", ParameterMode.Value)
}
}
}
}
}
}
});
layer.SetVisible(false, false).AlignTo(this.GetCmp<Panel>("Panel1").Element, "tl-tr", new int[] { 5, 0 }).SlideIn("l");
this.GetCmp<Button>(sender).Disabled = true;
return this.Direct();
}