BlendState Class
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Contains blend state for the device.
Inheritance Hierarchy
System.Object
Microsoft.Xna.Framework.Graphics.GraphicsResource
Microsoft.Xna.Framework.Graphics.BlendState
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in Microsoft.Xna.Framework.Graphics.dll)
Syntax
'Declaration
Public Class BlendState _
Inherits GraphicsResource
public class BlendState : GraphicsResource
The BlendState type exposes the following members.
Constructors
Name | Description | |
---|---|---|
BlendState | Creates an instance of the BlendState class with default values, using additive color and alpha blending. |
Top
Properties
Name | Description | |
---|---|---|
AlphaBlendFunction | Gets or sets the arithmetic operation when blending alpha values. The default is Add. | |
AlphaDestinationBlend | Gets or sets the blend factor for the destination alpha, which is the percentage of the destination alpha included in the blended result. The default is One. | |
AlphaSourceBlend | Gets or sets the source alpha blend factor. The default is One. | |
BlendFactor | Gets or sets the four-component (RGBA) blend factor for alpha blending. | |
ColorBlendFunction | Gets or sets the arithmetic operation when blending color values. The default is Add | |
ColorDestinationBlend | Gets or sets the blend factor for the destination color. The default is One. | |
ColorSourceBlend | Gets or sets the blend factor for the source color. The default is One. | |
ColorWriteChannels | Gets or sets which color channels (RGBA) are enabled for writing during color blending. The default value is None. | |
IsDisposed | Gets a value that indicates whether the object is disposed. (Inherited from GraphicsResource.) | |
MultiSampleMask | Gets or sets a bitmask which defines which samples can be written during multisampling. The default is 0xffffffff. |
Top
Methods
Name | Description | |
---|---|---|
Dispose() | Immediately releases the unmanaged resources used by this object. (Inherited from GraphicsResource.) | |
Dispose(Boolean) | Immediately releases the unmanaged resources used by this object. (Inherited from GraphicsResource.) | |
Finalize | Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object. (Inherited from GraphicsResource.) |
Top
Fields
Name | Description | |
---|---|---|
Additive | A built-in state object with settings for additive blend, which is adding the destination data to the source data without using alpha. | |
AlphaBlend | A built-in state object with settings for alpha blend, that is blending the source and destination data using alpha. | |
NonPremultiplied | A built-in state object with settings for blending with non-premultipled alpha, that is blending source and destination data using alpha while assuming the color data contains no alpha information. | |
Opaque | A built-in state object with settings for opaque blend, that is overwriting the source with the destination data. |
Top
Version Information
Silverlight
Supported in: 5
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.