Nevron .NET Vision Documentation
Shadow Style Editor

The Nevron Shadow Style Editor provides complete visual editing for the properties, which get or set an instance of the NShadowStyle class. It is exposed by the NShadowStyleTypeEditor class.
Applying the Editor to a Property

The following example demonstrates how to apply the shadow style type editor to a property:

C#
Copy Code
// Shadow style property edited by the shadow style editor
[Editor(typeof(NShadowStyleTypeEditor), typeof(UITypeEditor))]
public NShadowStyle ShadowStyle
{
    get
    {
  return m_ShadowStyle;
    }
    set
    {
  m_ShadowStyle = value;
    }
}
Visual Basic
Copy Code
` Shadow Style property edited by the shadow style editor
<Editor(GetType(NShadowStyleTypeEditor), GetType(UITypeEditor))> _
Public Property ShadowStyle() As Nevron.GraphicsCore.NShadowStyle
    Get
  Return m_ShadowStyle
    End Get
    Set(ByVal Value As Nevron.GraphicsCore.NShadowStyle)
  m_ShadowStyle = Value
    End Set
End Property
Showing the Editor from Code

The NShadowStyleTypeEditor can also be used to show the shadow style edtior via the Edit static method. For example:

C#
Copy Code
NShadowStyle inShadowStyle = new NShadowStyle();
NShadowStyle resultShadowStyle;
bool okPressed = NShadowStyleTypeEditor.Edit(inShadowStyle, false, out resultShadowStyle);
Visual Basic
Copy Code
Dim inShadowStyle As NShadowStyle = New NShadowFillStyle()
Dim resultShadowStyle As NShadowStyle
Dim okPressed As Boolean = NShadowStyleTypeEditor.Edit(inShadowStyle, False, resultShadowStyle)

This method returns a boolean value, which indicates whether the user pressed the OK button.

Shadow Style Editor User Interface

  • Use automatic check - the shadow style editor can optionally have its Use automatic check enabled. If it is enabled the initial state of the check indicates whether the currently edited shadow style belonged to the object exposing the edited shadow style property, or was automatically obtained from the framework (via style inheritance or other property inheritance mechanism). If you check the Use automatic check and click on the OK button the resulting shadow style will be null.
  • Type combo - specifies the shadow type as one of the following:

    - None
    - the object has no shadow
    - Solid Shadow - the solid shadow is the most common type of shadow used in applications. It is also the fastest.
    - Linear Blur Shadow - the linear blur shadow uses a linear distribution at the shadow edges.
    - Gaussian Blur Shadow - the Gaussian blur shadow uses a Gaussian distribution (sometimes also called normal distribution) at the shadow edges.
    - Radial Blur Shadow - the Radial blur shadow uses a radial distribution at the shadow edges.
  • Color button - specifies the shadow color
  • Fade Length selector - specifies the length in which the shadow fades to complete transparency (measured in a unit from one of the four predefined measurement systems). Only applicable for blurred shadows.
  • X Offset selector - specifies the X offset of the shadow from its original position. A negative value will cast the shadow on the right side of the object.
  • Y Offset selector - specifies the X offset of the shadow from its original position. A negative value will cast the shadow on the top side of the object.
  • Scale numeric updown - defines a percentage with which to scale to the shadow shape.
See Also

 

 


©2017. Nevron Software LLC.

Send Feedback