> For the complete documentation index, see [llms.txt](https://xojo.gitbook.io/add-ons/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xojo.gitbook.io/add-ons/cstruecolors/documentation/appkitaddition/visualeffectview.md).

# VisualEffectView

{% hint style="info" %}
Class / Control

Inherits from View

**macOS only!** Becomes a normal Canvas on other systems.
{% endhint %}

![All available materials of VisualEffectView](/files/-LOboDizSjUazDRggU0N)

Usually you drag a VisualEffectView onto the IDE, set its properties there and place controls on it. For experiments with custom controls, the class has a Constructor method too.

## Overview

### Methods

| Overview                                                                                                                                          |   |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | - |
| [Constructor](/add-ons/cstruecolors/documentation/appkitaddition/visualeffectview.md#constructor-x-as-double-y-as-double-w-as-double-h-as-double) |   |

### Properties

| Overview                                                                                                                                                      |                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| [BlendingMode](/add-ons/cstruecolors/documentation/appkitaddition/visualeffectview.md#blendingmode-as-nsvisueleffectblendingmode)                             | [Emphasized](/add-ons/cstruecolors/documentation/appkitaddition/visualeffectview.md#emphasized-as-boolean)   |
| [InteriorBackgroundStyle](/add-ons/cstruecolors/documentation/appkitaddition/visualeffectview.md#interiorbackgroundstyle-as-appkitaddition-nsbackgroundstyle) | [MaskImage](/add-ons/cstruecolors/documentation/appkitaddition/visualeffectview.md#maskimage-as-picture)     |
| [Material](/add-ons/cstruecolors/documentation/appkitaddition/visualeffectview.md#material-as-nsvisualeffectmaterial)                                         | [State](/add-ons/cstruecolors/documentation/appkitaddition/visualeffectview.md#state-as-nsvisualeffectstate) |

### Enumerations

| Overview                                                                                                                        |                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| [NSVisualEffectBlendingMode](/add-ons/cstruecolors/documentation/appkitaddition/visualeffectview.md#nsvisualeffectblendingmode) | [NSVisualEffectMaterial](/add-ons/cstruecolors/documentation/appkitaddition/visualeffectview.md#nsvisualeffectmaterial) |
| [NSVisualEffectState](/add-ons/cstruecolors/documentation/appkitaddition/visualeffectview.md#nsvisualeffectstate)               |                                                                                                                         |

## Documentation

### Methods

#### Constructor(x As Double, y As Double, w As Double, h As Double)

Creates a new VisualEffectView in code. Keep in mind that on macOS the y axis is reversed!

### Properties

#### BlendingMode As [NSVisualEffectBlendingMode](/add-ons/cstruecolors/documentation/appkitaddition/visualeffectview.md#nsvisualeffectblendingmode)

Specifies how the view’s contents are blurred. Default is BehindWindow.

#### Emphasized As Boolean

If the view should draw in "first responder" status, or not. *Available since macOS 10.12.*

#### InteriorBackgroundStyle As [AppKitAddition.NSBackgroundStyle](/add-ons/cstruecolors/documentation/appkitaddition.md#nsbackgroundstyle)

The view’s interior background style. *(read-only)*

#### MaskImage As Picture

An image whose alpha channel masks the visual effect view's material.

#### Material As [NSVisualEffectMaterial](/add-ons/cstruecolors/documentation/appkitaddition/visualeffectview.md#nsvisualeffectmaterial)

The material shown by the visual effect view. Please note several items have been deprecated and several new ones added with macOS Mojave.

#### State As [NSVisualEffectState](/add-ons/cstruecolors/documentation/appkitaddition/visualeffectview.md#nsvisualeffectstate)

Whether a view has a visual effect applied.

### Enumerations

#### NSVisualEffectBlendingMode

A value indicating how the view’s contents blend with the surrounding content. Values:

| Value        | Definition                                                                                                                     |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| BehindWindow | A mode that blends and blurs the visual effect view with the contents behind the window, such as the desktop or other windows. |
| WithinWindow | A mode that blends and blurs the visual effect view with contents behind the view in the current window only.                  |

#### NSVisualEffectMaterial

The material shown by the visual effect view. *Deprecations and additions since macOS 10.14.* Values:

| Value                       | Definition                                                         |
| --------------------------- | ------------------------------------------------------------------ |
| AppearanceBased\_Deprecated | A default material for the view’s effective appearance.            |
| Light\_Deprecated           | A material with a light effect.                                    |
| Dark\_Deprecated            | A material with a dark effect.                                     |
| Titlebar                    | The material for a window’s titlebar.                              |
| Selection                   | The material used to indicate a selection.                         |
| Menu                        | The material for menus.                                            |
| Popover                     | The material for the background of popover windows.                |
| Sidebar                     | The material for the background of window sidebars.                |
| MediumLight\_Deprecated     | A material with a medium-light effect.                             |
| UltraDark\_Deprecated       | A material with a medium-light effect.                             |
| HeaderView                  | The material for in-line header or footer views.                   |
| Sheet                       | The material for the background of sheet windows.                  |
| WindowBackground            | The material for the background of opaque windows.                 |
| HUDWIndow                   | The material for the background of heads-up display (HUD) windows. |
| FullScreenUI                | The material for the background of a full-screen modal interface.  |
| ToolTip                     | The material for the background of a tool tip.                     |
| ContentBackground           | The material for the background of opaque content.                 |
| UnderWindowBackground       | The material for under a window's background.                      |
| UnderPageBackground         | The material for the area behind the pages of a document.          |

#### NSVisualEffectState

A value that indicates whether and when a view has a visual effect applied. Values:

| Value                    | Definition                                                                                              |
| ------------------------ | ------------------------------------------------------------------------------------------------------- |
| FollowsWindowActiveState | The backdrop should automatically appear active when the window is active, and inactive when it is not. |
| Active                   | The backdrop should always appear active.                                                               |
| Inactive                 | The backdrop should always appear inactive.                                                             |
