# Using XP Themes with the Component

Learn how to optimize your Spread component for XP themes and enhance its visual appearance with our comprehensive guide.

## Content

You can set support for XP themes for the cells and graphical elements in the Spread component. The [VisualStyles](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.VisualStyles.html) property for the Spread component causes the cells to have the appearance of the XP theme. You can create a manifest file so that the scroll bars have a theme appearance.
By default the [VisualStyles](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.VisualStyles.html) property is set to Auto, so the graphical cell types paint the way the theme is set to paint (for example the button is themed so you cannot set a background color with the **BackColor** property). You either need to turn off VisualStyles for the Spread component or create a custom cell type where you override the **PaintCell** and **GetEditorControl** methods and then set the **VisualStyles** property of the Appearance object to off. A third alternative is to leave it "on" for the Spread component but turn it "off" for the individual control (such as the FpProgress control for the progress indicator cell).
Applying a sheet skin causes the **VisualStyles** property to be set to false.
If you are on Windows XP, then you need to add the following line of code to turn off the XP themes in the Spread.

```csharp
fpSpread1.VisualStyles = FarPoint.Win.VisualStyles.Off;
```

```csharp
FpSpread1.VisualStyles = FarPoint.Win.VisualStyles.Off
```

> !type=note
> **Note:**
>
> * Setting the **VisualStyles** property of the Spread to Off should return the look of the Spread to the classic look.
> * Buttons are not displayed as expected if you have changed the SelectionStyle and have VisualStyles on. The problem is that when VisualStyles are on certain cell types ignore certain settings, such as the button ignoring the setting of the **ButtonColor** property. You would need to take that into account and possibly set the SelectionForeColor, for example, to something different. The SelectionColors setting for SelectionStyle is an older style and mixing it with XP themes is not recommended.
> * The **VisualStyles** property is used on controls that Spread renders such as the button in the ButtonCellType. The scroll bars are child controls rendered by Visual Studio. To have them render with XP themes, you would need to set up a manifest for your application.

## Using the Properties Window

1. Select the Spread component.
2. In the **Properties** window, select the **VisualStyles** property, and choose an option from the drop-down list.

## Using Code

Add a line of code that allows the theme support by setting the [VisualStyles](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.VisualStyles.html) property for the Spread component.

## Example

This example sets the [VisualStyles](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.VisualStyles.html) property to on to allow XP themes.

```csharp
fpSpread1.VisualStyles = FarPoint.Win.VisualStyles.On;
```

```vbnet
fpSpread1.VisualStyles = FarPoint.Win.VisualStyles.On
```

## Using the Spread Designer

1. Select **Sheet** from the drop-down list located on the top right side of the Designer.
2. From the **Appearance** section, select an option for the **VisualStyles** property.
3. From the **File** menu, select **Save and Exit** to save the changes.

## See Also

[Customizing the Sheet Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance)
[Customizing the Dimensions of the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearcontroldims)
[Customizing the Individual Sheet Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearsheet)
[Customizing the Appearance of a Cell](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearcell)
[Customizing the Overall Component Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearcontrol)
[Creating and Applying a Style for Cells](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-cellstyle)
[Using Conditional Formatting of Cells](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-interact-condition)
[Customizing the Display of the Pointer](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-cntrlcursor)
[Customizing the User Interface Images](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-userimages)
[Customizing the Renderers](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-rendcustom)
[Handling Right-to-Left Layouts](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-rtlsupport)
[Customizing Painting of Parts of the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appear-painting)
[Text Rendering with GDI](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-feattextrender)
[Applying Theme to Customize the Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-spreadthemeapply)