<html dir="LTR">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
    <title>VisualStyleContext Class</title>
    <xml>
    </xml>
    <link rel="stylesheet" type="text/css" href="MSDN.css" />
  </head>
  <body id="bodyID" class="dtBODY">
    <div id="nsbanner">
      <div id="bannerrow1">
        <table class="bannerparthead" cellspacing="0">
          <tr id="hdr">
            <td class="runninghead">Skybound VisualStyles</td>
            <td class="product">
            </td>
          </tr>
        </table>
      </div>
      <div id="TitleRow">
        <h1 class="dtH1">VisualStyleContext Class</h1>
      </div>
    </div>
    <div id="nstext">
      <p> An object which activates application-wide visual style enhancement until it is disposed. </p>
      <p>For a list of all members of this type, see <a href="Skybound.VisualStyles.VisualStyleContextMembers.html">VisualStyleContext Members</a>.</p>
      <p>
        <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemObjectClassTopic.asp">System.Object</a>
        <br />   <b>Skybound.VisualStyles.VisualStyleContext</b></p>
      <div class="syntax">
        <span class="lang">[Visual Basic]</span>
        <br />MustInherit Public Class VisualStyleContext<div>    Implements <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemIDisposableClassTopic.asp">IDisposable</a></div></div>
      <div class="syntax">
        <span class="lang">[C#]</span>
        <div>public abstract class VisualStyleContext<b> : <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemIDisposableClassTopic.asp">IDisposable</a></b></div>
      </div>
      <H4 class="dtH4">Thread Safety</H4>
      <P>Public static (<b>Shared</b> in Visual Basic) members of this type are 
				safe for multithreaded operations. Instance members are <b>not</b> guaranteed to be 
				thread-safe.</P>
      <h4 class="dtH4">Remarks</h4>
      <p> The standard Windows Forms controls do not draw properly when visual styles are enabled. For example, the <b>TabPage</b> control draws a gray background instead of the properly themed gradient background. Transparent controls placed on tab pages also draw this gray background, even when the tab page itself is properly themed. Furthermore, the <b>Image</b> property is ignored and no image is drawn on <b>Button</b>, <b>CheckBox</b>, and <b>RadioButton</b> controls. </p>
      <p> The <b>VisualStyleContext</b> class fixes these problems. When you create a new <b>VisualStyleContext</b>, VisualStyles it will use its internal drawing routines to enhance all the controls in your application. This means that transparent controls will draw properly on tab pages, and images will be displayed properly on <b>Button</b>, <b>CheckBox</b>, and <b>RadioButton</b> controls. Also, controls that should have transparent backgrounds (such as <b>Label</b> and <b>TrackBar</b>, and read-only <b>TextBox</b> controls) are drawn correctly. </p>
      <p>To learn how to use a <b>VisualStyleContext</b> in your application, please refer to <b>1. Enabling VisualStyles</b> in the Programmer's Guide.</p>
      <h4 class="dtH4">Requirements</h4>
      <p>
        <b>Namespace: </b>
        <a href="Skybound.VisualStyles.html">Skybound.VisualStyles</a>
      </p>
      <p>
        <b>Assembly: </b>Skybound.VisualStyles (in Skybound.VisualStyles.dll)
					</p>
      <h4 class="dtH4">See Also</h4>
      <p>
        <a href="Skybound.VisualStyles.VisualStyleContextMembers.html">VisualStyleContext Members</a> | <a href="Skybound.VisualStyles.html">Skybound.VisualStyles Namespace</a></p>
      <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;">
        <param name="Keyword" value="VisualStyleContext class, about VisualStyleContext class">
        </param>
      </object>
      <hr />
      <div id="footer"><a target="_top" href="http://www.skybound.ca/contact.aspx?Product=VisualStyles">Any questions?<p>© 2005 Skybound.  All Rights Reserved.</a><p></div>
    </div>
  </body>
</html>
