System.Windows.Forms 2.0.0.0 System.Object The namespace exposes objects that represent all of the controls and user interface (UI) elements that are supported by visual styles. To draw or get information about a particular element, you must set a to the element you are interested in. A is automatically set to a specified in the constructor, but you can also set an existing to a different element by calling the method. To draw an element, use the method. The class also includes methods, such as and , that provide information about how an element is defined by the current visual style. The constructor and many of the methods throw exceptions unless visual styles are enabled in the operating system and visual styles are applied to the client area of application windows. To check for these conditions, use the static property. The class wraps the functionality of the visual styles (UxTheme) API from the Windows Shell portion of the Windows Platform SDK. For more information about visual styles, see "Using Windows XP Visual Styles" in the Platform SDK portion of the MSDN Library at http://msdn.microsoft.com/library. Provides methods for drawing and getting information about a . This class cannot be inherited. Constructor This constructor uses the , , and properties of the parameter to initialize the , , and properties. Before using this constructor, you should call the static method to verify whether the current visual style provides a definition for the element specified by the parameter. Initializes a new instance of the class using the given . A that this will represent. 2.0.0.0 Constructor This constructor uses the , , and parameters to initialize the , , and properties. Before using this constructor, you should call the static method to verify whether the current visual style provides a definition for the element specified by the , , and parameters. Initializes a new instance of the class using the given class, part, and state values. The class name of the element that this will represent. The part of the element that this will represent. The state of the element that this will represent. 2.0.0.0 Property System.String To be added. This property identifies a group of related controls or user interface (UI) elements. For more information about the class, part, and state of a visual style element, see the class. Gets the class name of the current visual style element. 2.0.0.0 Method System.Void This method draws the background of the current visual style element specified by the , , and properties. If the or of the rectangle specified by the parameter is less than 0, the method will return without drawing the background. The background of a visual style element can be a bitmap file or a filled border. To determine the background type, call the method with an argument value of . To determine whether the element background will scale to fit the specified bounds, call the method with an argument value of . Draws the background image of the current visual style element within the specified bounding rectangle. The used to draw the background image. A in which the background image is drawn. 2.0.0.0 Method System.Void This method draws the background of the current visual style element specified by the , , and properties. The background will be clipped to the area specified by the parameter. If the or of the rectangle specified by either the or parameters is less than 0, the method will return without drawing the background. The background of a visual style element can be a bitmap file or a filled border. To determine the background type, call the method with an argument value of . To determine whether the element background will scale to fit the specified bounds, call the method with an argument value of . Draws the background image of the current visual style element within the specified bounding rectangle and clipped to the specified clipping rectangle. The used to draw the background image. A in which the background image is drawn. A that defines a clipping rectangle for the drawing operation. 2.0.0.0 Method System.Drawing.Rectangle To be added. Draws one or more edges of the specified bounding rectangle. A that represents the interior of the parameter, minus the edges that were drawn. The used to draw the edges. The whose bounds define the edges to draw. A bitwise combination of the values. A bitwise combination of the values. A bitwise combination of the values. 2.0.0.0 Method System.Void If the visual style applies one of the effects specified by the values to the current element, this method will apply the effect to the drawn image. Draws the specified image within the specified bounds. The used to draw the image. A in which the image is drawn. The to draw. 2.0.0.0 Method System.Void If the visual style applies one of the effects specified by the values to the current element, this method will apply the effect to the drawn image. Draws the image from the specified within the specified bounds. The used to draw the image. A in which the image is drawn. An that contains the to draw. The index of the within to draw. 2.0.0.0 Method System.Void To be added. Draws the background of a control's parent in the specified area. The used to draw the background of the parent of . This object typically belongs to the child control. A in which to draw the parent control's background. This rectangle should be inside the child control’s bounds. The control whose parent's background will be drawn. 2.0.0.0 Method System.Void To be added. Draws text in the specified bounds using default formatting. The used to draw the text. A in which to draw the text. The text to draw. 2.0.0.0 Method System.Void To be added. Draws text in the specified bounds with the option of displaying disabled text. The used to draw the text. A in which to draw the text. The text to draw. true to draw grayed-out text; otherwise, false. 2.0.0.0 Method System.Void To be added. Draws text in the specified bounding rectangle with the option of displaying disabled text and applying other text formatting. The used to draw the text. A in which to draw the text. The text to draw. true to draw grayed-out text; otherwise, false. A bitwise combination of the values. 2.0.0.0 Method System.Drawing.Rectangle A visual style can define a content area within each background image. This is the area in which content such as text and icons can be placed without overwriting background borders. This method uses the given background area to calculate the content area for the current visual style element. Returns the content area for the background of the current visual style element. A that contains the content area for the background of the current visual style element. The this operation will use. A that contains the entire background area of the current visual style element. 2.0.0.0 Method System.Drawing.Rectangle A visual style can define a content area within each background image. This is the area in which content such as text and icons can be placed without overwriting background borders. This method uses the given content area to calculate the entire background area for the current visual style element. Returns the entire background area for the current visual style element. A that contains the entire background area of the current visual style element. The this operation will use. A that contains the content area of the current visual style element. 2.0.0.0 Method System.Drawing.Region This method can be used to get the of a visual style element that has partially transparent or alpha-blended parts in its background. Returns the region for the background of the current visual style element. The that contains the background of the current visual style element. The this operation will use. A that contains the entire background area of the current visual style element. 2.0.0.0 System.Security.SuppressUnmanagedCodeSecurity Method System.Boolean Visual styles use a set of Boolean values to describe some properties of the elements defined by a style. These properties are encapsulated by the values. Returns the value of the specified Boolean property for the current visual style element. true if the property specified by the parameter is true for the current visual style element; otherwise, false. One of the values that specifies which property value to retrieve for the current visual style element. 2.0.0.0 Method System.Drawing.Color Visual styles use a set of color values to describe some properties of the elements defined by a style. These properties are encapsulated by the values. Returns the value of the specified color property for the current visual style element. A that contains the value of the property specified by the parameter for the current visual style element. One of the values that specifies which property value to retrieve for the current visual style element. 2.0.0.0 Method System.Int32 Visual styles use a set of enumerated types to describe some properties of the elements defined by a style. These enumerated types are encapsulated by the values. Returns the value of the specified enumerated type property for the current visual style element. The integer value of the property specified by the parameter for the current visual style element. One of the values that specifies which property value to retrieve for the current visual style element. 2.0.0.0 Method System.String Visual styles can specify the names of image files that are used to draw a particular element in different sizes and resolutions. These file names are encapsulated by the values. Returns the value of the specified file name property for the current visual style element. A that contains the value of the property specified by the parameter for the current visual style element. One of the values that specifies which property value to retrieve for the current visual style element. 2.0.0.0 Method System.Drawing.Font Visual styles use a set of font values to describe some properties of the elements defined by a style. These properties are encapsulated by the values. Returns the value of the specified font property for the current visual style element. A that contains the value of the property specified by the parameter for the current visual style element. The this operation will use. One of the values that specifies which property value to retrieve for the current visual style element. 2.0.0.0 Method System.Int32 Visual styles use a set of integer values to describe some properties of the elements defined by a style. These properties are encapsulated by the values. Returns the value of the specified integer property for the current visual style element. The integer value of the property specified by the parameter for the current visual style element. One of the values that specifies which property value to retrieve for the current visual style element. 2.0.0.0 Method System.Windows.Forms.Padding Visual styles use a set of margin values to describe some properties of the elements defined by a style. These properties are encapsulated by the values. Returns the value of the specified margins property for the current visual style element. A that contains the value of the property specified by the parameter for the current visual style element. The this operation will use. One of the values that specifies which property value to retrieve for the current visual style element. 2.0.0.0 Method System.Drawing.Size Typically, only the and values should be used for the parameter of this method. Returns the value of the specified size property of the current visual style part. A that contains the size specified by the parameter for the current visual style part. The this operation will use. One of the values that specifies which size value to retrieve for the part. 2.0.0.0 Method System.Drawing.Size To be added. Returns the value of the specified size property of the current visual style part using the specified drawing bounds. A that contains the size specified by the parameter for the current visual style part. The this operation will use. A that contains the area in which the part will be drawn. One of the values that specifies which size value to retrieve for the part. 2.0.0.0 Method System.Drawing.Point Visual styles use a set of point values to describe some properties of the elements defined by a style. These properties are encapsulated by the values. Returns the value of the specified point property for the current visual style element. A that contains the value of the property specified by the parameter for the current visual style element. One of the values that specifies which property value to retrieve for the current visual style element. 2.0.0.0 Method System.String Visual styles use a set of string values to describe some properties of the elements defined by a style. These properties are encapsulated by the values. Returns the value of the specified string property for the current visual style element. A that contains the value of the property specified by the parameter for the current visual style element. One of the values that specifies which property value to retrieve for the current visual style element. 2.0.0.0 Method System.Drawing.Rectangle To be added. Returns the size and location of the specified string when drawn with the font of the current visual style element. A that contains the area required to fit the rendered text. The this operation will use. The string to measure. A bitwise combination of the values. 2.0.0.0 Method System.Drawing.Rectangle To be added. Returns the size and location of the specified string when drawn with the font of the current visual style element within the specified initial bounding rectangle. A that contains the area required to fit the rendered text. The this operation will use. A used to control the flow and wrapping of the text. The string to measure. A bitwise combination of the values. 2.0.0.0 Method System.Windows.Forms.VisualStyles.TextMetrics To be added. Retrieves information about the font specified by the current visual style element. A that provides information about the font specified by the current visual style element. The this operation will use. 2.0.0.0 Property System.IntPtr To be added. This property is used internally by the methods. If the class of elements specified by the property is not defined by the current visual style, then this property returns . This property value is invalidated when the visual style of the operating system changes, or when the user disables visual styles. If you access this property directly, your code should query this property again to get a new handle when the event is raised with the property value of . Gets a unique identifier for the current class of visual style elements. 2.0.0.0 Method System.Windows.Forms.VisualStyles.HitTestCode To be added. Returns a hit test code indicating whether a point is contained in the background of the current visual style element. A that describes where is located in the background of the current visual style element. The this operation will use. A that contains the background of the current visual style element. The to test. A bitwise combination of the values. 2.0.0.0 Method System.Windows.Forms.VisualStyles.HitTestCode To be added. Returns a hit test code indicating whether the point is contained in the background of the current visual style element and within the specified bounds. A that describes where is located in the background of the current visual style element, if at all. The this operation will use. A that contains the background of the current visual style element. A that specifies the bounds of the hit test area within the background. The to test. A bitwise combination of the values. 2.0.0.0 Method System.Windows.Forms.VisualStyles.HitTestCode To be added. Returns a hit test code indicating whether the point is contained in the background of the current visual style element and within the specified region. A that describes where is located in the background of the current visual style element. The this operation will use. A that contains the background of the current visual style element. A Windows handle to a that specifies the bounds of the hit test area within the background. The to test. A bitwise combination of the values. 2.0.0.0 Method System.Boolean To be added. Indicates whether the background of the current visual style element has any semitransparent or alpha-blended pieces. true if the background of the current visual style element has any semitransparent or alpha-blended pieces; otherwise, false. 2.0.0.0 Method System.Boolean This method checks the value of the property internally. Determines whether the specified visual style element is defined by the current visual style. true if the combination of the and properties of are defined; otherwise, false. A whose class and part combination will be verified. 2.0.0.0 Property System.Boolean To be added. The following table describes how to individually check for each of the three conditions that must exist for the property to return true. Condition How to determine separately The operating system supports visual styles. Verify that the property of the class is true. The user has enabled visual styles in the operating system. Verify that the property of the class is true. Visual styles are being used to draw the client area of application windows. Verify that the property of the class has the value or . Gets a value specifying whether the operating system is using visual styles to draw controls. 2.0.0.0 Property System.Int32 To be added. This property gets the HRESULT value that was returned by the last native visual styles API method called by a member of the class. For more information about the native visual styles API, see "Using Windows XP Visual Styles" in the Platform SDK portion of the MSDN Library at http://msdn.microsoft.com/library. Gets the last error code returned by the native visual styles (UxTheme) API methods encapsulated by the class. 2.0.0.0 Property System.Int32 To be added. This property identifies a particular specialization of a class. For more information about the class, part, and state of a visual style element, see the class. Gets the part of the current visual style element. 2.0.0.0 Method System.Void This method checks the value of the property internally. Before calling this method, you should call the method to verify that the current visual style provides a definition for the element specified by the parameter. Sets this to the visual style element represented by the specified . A that specifies the new values of the , , and properties. 2.0.0.0 Method System.Void This method checks the value of the property internally. Before calling this method, you should call the method to verify that the current visual style provides a definition for the element specified by the , , and parameters. Sets this to the visual style element represented by the specified class, part, and state values. The new value of the property. The new value of the property. The new value of the property. 2.0.0.0 Property System.Int32 To be added. This property identifies the current visual state of the element identified by the current and property values. For more information about the class, part, and state of a visual style element, see the class. Gets the state of the current visual style element. 2.0.0.0