Framework > Presentation Layer > Editors > Appearance Styles Editors > Text Style Editor |
The Nevron Text Style Editor provides complete visual editing for the properties, which get or set an instance of the NTextStyle class. It is exposed by the NTextStyleTypeEditor class.
The following example demonstrates how to apply the text style type editor to a property:
C# |
Copy Code
|
---|---|
// Text Style property edited by the text style editor [Editor(typeof(NTextStyleTypeEditorNoAutomatic), typeof(UITypeEditor))] public NTextStyle TextStyle { get { return m_TextStyle; } set { m_TextStyle = value; } } |
Visual Basic |
Copy Code
|
---|---|
` Text Style property edited by the text style editor <Editor(GetType(NTextStyleTypeEditor), GetType(UITypeEditor))> _ Public Property TextStyle() As Nevron.GraphicsCore.NTextStyle Get Return m_TextStyle End Get Set(ByVal Value As Nevron.GraphicsCore.NTextStyle) m_TextStyle = Value End Set End Property |
The NTextStyleTypeEditor can also be used to show the Text Style Editor via the Edit static method. For example:
C# |
Copy Code
|
---|---|
NTextStyle inTextStyle = new NTextStyle(); NTextStyle resultTextStyle; NTextStyleTypeEditor.Edit(inTextStyle, false, out resultTextStyle); |
Visual Basic |
Copy Code
|
---|---|
Dim inTextStyle As NTextStyle = New NTextStyle() Dim resultTextStyle As NTextStyle Dim okPressed As Boolean = NTextStyleTypeEditor.Edit(inTextStyle, False, resultTextStyle) |
This method returns a boolean value, which indicates whether the user pressed the OK button.