Nevron .NET Vision
Framework / Presentation Layer / Editors / Appearance Styles Editors / Frame Style Editor

In This Topic
    Frame Style Editor
    In This Topic
    The Nevron Frame Style Editor provides complete visual editing for the properties, which get or set an instance of the NFrameStyle class. It is exposed by the NFrameStyleTypeEditor class. Since frame styles are usually used in the context of other styles (for example backplane style, background style etc.) the frame style editor is in most cases embedded in the editors of the composite styles, which contain it.
     Applying the Editor to a Property

    Although typically embedded in other styles, you can still apply the frame style type editor to a property:

    C#
    Copy Code
    // Frame style property edited by the frame style type editor 
    [Editor(typeof(NFrameStyleTypeEditor), typeof(UITypeEditor))]
    public NFrameStyle FrameStyle
    {
        get
        {
      return m_FrameStyle;
        }
        set
        {
      m_FrameStyle = value;
        }
    }
    
    Visual Basic
    Copy Code
    ` Frame Style property edited by the frame style editor
    <Editor(GetType(NFrameStyleTypeEditor), GetType(UITypeEditor))> _
    Public Property FrameStyle() As Nevron.GraphicsCore.NFrameStyle
        Get
            Return m_FrameStyle
        End Get
        Set(ByVal Value As Nevron.GraphicsCore.NFrameStyle)
            m_FrameStyle = Value
        End Set
    End Property
    
     Showing the Editor from Code

    The NFrameStyleTypeEditor can also be used to show the Frame Style Editor via the Edit static method. For example:

    C#
    Copy Code
    NFrameStyle inFrameStyle = new NStandardFrameStyle();
    NFrameStyle resultFrameStyle;
    bool okPressed = NFrameStyleTypeEditor.Edit(inFrameStyle, false, out resultFrameStyle);
    
    Visual Basic
    Copy Code
    Dim inFrameStyle As NFrameStyle = New NStandardFrameStyle()
    Dim resultFrameStyle As NFrameStyle
    Dim okPressed As Boolean = NFrameStyleTypeEditor.Edit(inFrameStyle, False, resultFrameStyle)
    

    This method returns a boolean value, which indicates whether the user pressed the OK button. The actual type of the resulting frame style depends on the selected item in the Frame Style combo box. The following table illustrates this relation:

    Frame style combo box item Frame style type
    Standard NStandardFrameStyle
    Image NImageFrameStyle
     Frame Style Editor User Interface
    • Use automatic check - the frame 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 frame style belonged to the object exposing the edited frame 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 frame style will be null.
    • Frame Style combo - defines the type of frame style that you want to apply and automatically displays the editor corresponding to that type of frame style.
    • Standard Frame Style editor - this editor lets you visually define a standard frame. Standard frames are rectangular frames, which are very similar to the borders, which can be applied to most Windows controls. See the Standard Frame Style topic for more information.

       
    • Image Frame Style editor - this editor lets you visually define an image (artistic) frame. Image frames are more complex than standard frames, but look much more visually appealing. See the Image Frame Style  topic for more information.

       

      Appearance tab - from the Shape section, you can choose between several predefined types of image frame shapes.  For shapes with rounded edges you can specify the outer and inner edge percent. The Light effect section provides the length, light color and shadow color of the image frame shading effect. The Background color button control the color with which the image frame blends with the background.

      Size tab - lets you define the sizes of the frame tubes and corners.

      Fill Style tab - defines the fill style of the frame. Embeds the Fill Style Editor.

      Border Style tab - defines the style of the frame borders. Embeds the Stroke Style Editor.

      Shadow Style tab - edits the shadow of the frame. Embeds the Shadow Style Editor.
    See Also