Html32TextWriter.SupportsItalic Property

 

Gets or sets a Boolean value indicating whether the requesting device supports italic HTML text. Use the SupportsItalic property to conditionally render italicized text to the Html32TextWriter output stream.

Namespace:   System.Web.UI
Assembly:  System.Web (in System.Web.dll)

member SupportsItalic : bool with get, set

Property Value

Type: System.Boolean

true if the requesting device supports italic text; otherwise, false. The default is true.

The following code example demonstrates how to override the RenderBeforeContent and RenderAfterContent methods. Each override checks whether a span element is being rendered, and then uses the SupportsItalic property to check whether the requesting device can display italic formatting. If the device supports italic formatting, the RenderBeforeContent method writes the opening tag of an i element and the RenderAfterContent method writes its closing tag. If the device does not support italic formatting, the RenderBeforeContent method writes the opening tag of a Font element with a color attribute set to the hexadecimal value for navy blue, and the RenderAfterContent method writes the closing tag.

This code example is part of a larger example provided for the Html32TextWriter class.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: