Class ShadowStyle
A ShadowStyle is a collection of properties that define how shadows are displayed for a filled shape.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public class ShadowStyle : PropertyContainer, IServiceReferenceHolder, IServiceReferenceProvider, IPropertyObserver, IPropertyContainer, ICloneable, ISerializable, IDisposable
Constructors
ShadowStyle()
Initializes a new instance of the ShadowStyle class.
Declaration
public ShadowStyle()
ShadowStyle(ShadowStyle)
Initializes a new instance of the ShadowStyle class.
Declaration
public ShadowStyle(ShadowStyle src)
Parameters
Type | Name | Description |
---|---|---|
ShadowStyle | src | The SRC. |
ShadowStyle(SerializationInfo, StreamingContext)
Initializes a new instance of the ShadowStyle class.
Declaration
protected ShadowStyle(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The info. |
System.Runtime.Serialization.StreamingContext | context | The context. |
Properties
Color
Gets or sets the shadow color.
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color | The color. |
ColorAlphaFactor
Gets or sets alpha blending factor.
Declaration
public int ColorAlphaFactor { get; set; }
Property Value
Type |
---|
System.Int32 |
ForeColor
Gets or sets foreground color used for the fill style.
Declaration
public Color ForeColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
Remarks
NOTE: If Type is set to FillType.LinearGradient, then this is the starting color for the gradient.
ForeColorAlphaFactor
Gets or sets alpha blending factor for the ForeColor.
Declaration
public int ForeColorAlphaFactor { get; set; }
Property Value
Type |
---|
System.Int32 |
InheritContainerMeasureUnits
Gets or sets a value indicating whether current instance inherit container measure units.
Declaration
public override bool InheritContainerMeasureUnits { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Overrides
MeasureUnit
Gets or sets the measure unit.
Declaration
public override MeasureUnits MeasureUnit { get; set; }
Property Value
Type | Description |
---|---|
MeasureUnits | The measure unit. |
Overrides
OffsetX
Gets or sets the distance of the shadow offset from the shape along the X axis.
Declaration
public float OffsetX { get; set; }
Property Value
Type |
---|
System.Single |
OffsetY
Gets or sets the distance of the shadow offset from the shape along the Y axis.
Declaration
public float OffsetY { get; set; }
Property Value
Type |
---|
System.Single |
PathBrushStyle
Gets or sets the path brush style.
Declaration
public PathGradientBrushStyle PathBrushStyle { get; set; }
Property Value
Type | Description |
---|---|
PathGradientBrushStyle | The path brush style. |
Texture
Gets or sets image to use for texture fill.
Declaration
public Image Texture { get; set; }
Property Value
Type |
---|
System.Drawing.Image |
TextureWrapMode
Gets or sets the mode how the texture is wrapped if fill type is set to texture.
Declaration
public WrapMode TextureWrapMode { get; set; }
Property Value
Type |
---|
System.Drawing.Drawing2D.WrapMode |
Visible
Gets or sets a value indicating whether the shadow is visible or not.
Declaration
public bool Visible { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
Clone()
Creates a new object that is a copy of the current instance.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | A new object that is a copy of this instance. |
Overrides
CreateBrush(Graphics, RectangleF)
Creates a brush for filling the shadow.
Declaration
public Brush CreateBrush(Graphics gfx, RectangleF fillrect)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | The graphics. |
System.Drawing.RectangleF | fillrect | The fill rect. |
Returns
Type | Description |
---|---|
System.Drawing.Brush | Brush matching the Shadow style. |
Dispose()
Declaration
public override void Dispose()
Overrides
Equals(Object)
Determines whether the specified System.Object is equal to the current System.Object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The System.Object to compare with the current System.Object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified System.Object is equal to the current System.Object; otherwise, false. |
Overrides
Exceptions
Type | Condition |
---|---|
System.NullReferenceException | The |
GetHashCode()
Serves as a hash function for a particular type.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the current System.Object. |
Overrides
GetObjectData(SerializationInfo, StreamingContext)
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
Declaration
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The System.Runtime.Serialization.SerializationInfo to populate with data. |
System.Runtime.Serialization.StreamingContext | context | The destination (see System.Runtime.Serialization.StreamingContext) for this serialization. |
Overrides
Exceptions
Type | Condition |
---|---|
System.Security.SecurityException | The caller does not have the required permission. |
GetPropertyContainerName()
Gets the name of the property container.
Declaration
protected override string GetPropertyContainerName()
Returns
Type | Description |
---|---|
System.String | Property container name. |
Overrides
OnMeasureUnitsChanging(MeasureUnits, MeasureUnits)
Called when measure units changing.
Declaration
protected override void OnMeasureUnitsChanging(MeasureUnits from, MeasureUnits to)
Parameters
Type | Name | Description |
---|---|---|
MeasureUnits | from | The old value. |
MeasureUnits | to | The new value. |
Overrides
ShouldSerializeColor()
Serialize the color.
Declaration
protected bool ShouldSerializeColor()
Returns
Type | Description |
---|---|
System.Boolean | true, if serialize color. |
UpdateServiceReferences(IServiceReferenceProvider)
Updates the service references.
Declaration
public override void UpdateServiceReferences(IServiceReferenceProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IServiceReferenceProvider | provider | The provider. |