mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 01:41:17 -10:00
* AdRotator.cs: * BaseValidator.cs: * Button.cs: * Calendar.cs: * CheckBox.cs: * CheckBoxList.cs: * DataGrid.cs: * DataList.cs: * DropDownList.cs: * HyperLink.cs: * Image.cs: * ImageButton.cs: * Label.cs: * LinkButton.cs: * ListBox.cs: * Panel.cs: * PlaceHolder.cs: * RadioButton.cs: * RadioButtonList.cs: * Table.cs: * TableRow.cs: * TextBox.cs: * WebControl.cs: * Xml.cs: added/fixed all attributes used by xsp. svn path=/trunk/mcs/; revision=5640
99 lines
2.0 KiB
C#
99 lines
2.0 KiB
C#
/**
|
|
* Namespace: System.Web.UI.WebControls
|
|
* Class: Panel
|
|
*
|
|
* Author: Gaurav Vaish
|
|
* Maintainer: [email protected]
|
|
* Contact: <[email protected]>, <[email protected]>
|
|
* Implementation: yes
|
|
* Status: 100%
|
|
*
|
|
* (C) Gaurav Vaish (2002)
|
|
*/
|
|
|
|
using System;
|
|
using System.ComponentModel;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
|
|
namespace System.Web.UI.WebControls
|
|
{
|
|
//[Designer("??")]
|
|
[DefaultProperty("ID")]
|
|
[ParseChildren(false)]
|
|
[PersistChildren(true)]
|
|
[ToolboxData("<{0}:Panel runat=\"server\">Panel</{0}:Panel>")]
|
|
public class Panel: WebControl
|
|
{
|
|
public Panel(): base(HtmlTextWriterTag.Div)
|
|
{
|
|
}
|
|
|
|
public virtual string BackImageUrl
|
|
{
|
|
get
|
|
{
|
|
object o = ViewState["BackImageUrl"];
|
|
if(o != null)
|
|
return (string)o;
|
|
return String.Empty;
|
|
}
|
|
set
|
|
{
|
|
ViewState["BackImageUrl"] = value;
|
|
}
|
|
}
|
|
|
|
public virtual HorizontalAlign HorizontalAlign
|
|
{
|
|
get
|
|
{
|
|
object o = ViewState["HorizontalAlign"];
|
|
if(o != null)
|
|
return (HorizontalAlign)o;
|
|
return HorizontalAlign.NotSet;
|
|
}
|
|
set
|
|
{
|
|
if(!Enum.IsDefined(typeof(HorizontalAlign), value))
|
|
{
|
|
throw new ArgumentException();
|
|
}
|
|
ViewState["HorizontalAlign"] = value;
|
|
}
|
|
}
|
|
|
|
public virtual bool Wrap
|
|
{
|
|
get
|
|
{
|
|
object o = ViewState["Wrap"];
|
|
if(o != null)
|
|
return (bool)o;
|
|
return true;
|
|
}
|
|
set
|
|
{
|
|
ViewState["Wrap"] = value;
|
|
}
|
|
}
|
|
|
|
protected override void AddAttributesToRender(HtmlTextWriter writer)
|
|
{
|
|
base.AddAttributesToRender(writer);
|
|
if(BackImageUrl.Length > 0)
|
|
{
|
|
writer.AddStyleAttribute(HtmlTextWriterStyle.BackgroundImage, "url(" + ResolveUrl(BackImageUrl) + ")");
|
|
}
|
|
if(HorizontalAlign != HorizontalAlign.NotSet)
|
|
{
|
|
writer.AddAttribute(HtmlTextWriterAttribute.Align, TypeDescriptor.GetConverter(typeof(HorizontalAlign)).ConvertToString(HorizontalAlign));
|
|
}
|
|
if(Wrap)
|
|
{
|
|
writer.AddAttribute(HtmlTextWriterAttribute.Nowrap, "nowrap");
|
|
}
|
|
}
|
|
}
|
|
}
|