Nevron .NET Vision Documentation
Fill Style Editor

The Nevron Fill Style Editor provides complete visual editing for the properties, which get or set an instance of the NFillStyle class. It is exposed by the NFillStyleTypeEditor class.

Applying the Editor to a Property

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

Copy Code
// Fill Style property edited by the fill style editor
[Editor(typeof(NFillStyleTypeEditor), typeof(UITypeEditor))]
public NFillStyle FillStyle
  return m_FillStyle;
  m_FillStyle = value;
Visual Basic
Copy Code
` Fill Style property edited by the fill style editor 
<Editor(GetType(NFillStyleTypeEditor), GetType(UITypeEditor))> _
Public Property FillStyle() As Nevron.GraphicsCore.NFillStyle
  Return m_FillStyle
    End Get
    Set(ByVal Value As Nevron.GraphicsCore.NFillStyle)
  m_FillStyle = Value
    End Set
End Property
Showing the Editor from Code

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

[Visual Basic]
Dim inFillStyle As NFillStyle = New NColorFillStyle(Color.Red)
Dim resultFillStyle As NFillStyle
Dim okPressed As Boolean = NFillStyleTypeEditor.Edit(inFillStyle, False, resultFillStyle)
NFillStyle inFillStyle = new NColorFillStyle(Color.Red);
NFillStyle resultFillStyle;
bool okPressed = NFillStyleTypeEditor.Edit(inFillStyle, false, out resultFillStyle);

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

Fill Style Combo Box Item Fill Style Type
Color NColorFillStyle
Gradient NGradientFillStyle
Image NImageFillStyle
Hatch NHatchFillStyle
Advanced Gradient NAdvancedGradientFillStyle

Following is a brief description of the Fill Style Editor User Interface:

See Also



©2019. Nevron Software LLC.

Send Feedback