HtmlElement.GetStyleAttribute Method
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Retrieves the specified style attribute for the current HTML element.
Namespace: System.Windows.Browser
Assembly: System.Windows.Browser (in System.Windows.Browser.dll)
Syntax
'Declaration
Public Function GetStyleAttribute ( _
name As String _
) As String
public string GetStyleAttribute(
string name
)
Parameters
- name
Type: System.String
The name of the style attribute to retrieve.
Return Value
Type: System.String
The style attribute for the current HTML element.
Exceptions
Exception | Condition |
---|---|
ArgumentException | name is an empty string. |
ArgumentNullException | name is nulla null reference (Nothing in Visual Basic). |
Remarks
If the style attribute is not recognized, this method's behavior is determined by the browser.
Version Information
Silverlight
Supported in: 5, 4, 3
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.