ListView.Width 属性
定义
public:
virtual property System::Web::UI::WebControls::Unit Width { System::Web::UI::WebControls::Unit get(); void set(System::Web::UI::WebControls::Unit value); };
[System.ComponentModel.Browsable(false)]
public override System.Web.UI.WebControls.Unit Width { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.Width : System.Web.UI.WebControls.Unit with get, set
Public Overrides Property Width As Unit
属性值
Empty,表示该属性未设置。Empty, which indicates that the property is not set.
- 属性
例外
注解
控件不支持样式属性 ListView 。Style properties are not supported by the ListView control. 如果尝试设置该 Width 属性,则 NotSupportedException 会引发异常。If you try to set the Width property, a NotSupportedException exception is thrown. 如果获得属性,它将返回基类的相应属性的默认值。If you get the property, it returns the default value of the corresponding property of the base class.
若要为 ListView 控件的样式,必须 ListView 使用级联样式表 (CSS) 类或内联样式元素来为模板内的控件制定样式。To style the ListView control, you must style the controls inside the ListView templates by using cascading style sheets (CSS) classes or inline style elements.