Contains static methods which create standard controls.
For a list of all members of this type, see StandardControls Members.
System.Object
Aspose.Editor.Client.StandardControls
[Visual Basic]
NotInheritable Public Class StandardControls
[C#]public sealed class StandardControls
Remarks
Standard controls can be used with Bars property in order to get default implementation of the menu bar, tool bar, ruler and others.
Some of the returned standard controls can be customized by the application. For example menu bar can be extended with additonal menu items.
Example
Shows how to put the standard menu to the editor using StandardControls class factory.
[C#]
// Normally this code is generated by Visual Studio .NET when you drag and drop
// the editor control into your Windows Form, but you can also code it youself.
EditorControl editorControl = new EditorControl();
editorControl.Dock = DockStyle.Fill;
// Put the standard menu into the editor
editorControl.Bars.Menu = StandardControls.CreateMenuBar(editorControl);
[Visual Basic]
' Normally this code is generated by Visual Studio .NET when you drag and drop
' the editor control into your Windows Form, but you can also code it youself.
Dim editorControl As New EditorControl()
editorControl.Dock = DockStyle.Fill
' Put the standard menu into the editor
editorControl.Bars.Menu = StandardControls.CreateMenuBar(editorControl)
Shows how to compose the toolbars using StandardControls factory.
[C#]
// Normally this code is generated by Visual Studio .NET when you drag and drop
// the editor control into your Windows Form, but you can also code it youself.
EditorControl editorControl = new EditorControl();
editorControl.Dock = DockStyle.Fill;
// Build desired toolbars collection
Control[] toolsBars = new Control[]
{
StandardControls.CreateToolBar(ToolBarType.File, editorControl),
StandardControls.CreateToolBar(ToolBarType.View, editorControl),
};
// Put the toolbars collection into the editor
editorControl.Bars.Tools = toolsBars;
[Visual Basic]
' Normally this code is generated by Visual Studio .NET when you drag and drop
' the editor control into your Windows Form, but you can also code it youself.
Dim editorControl As New EditorControl()
editorControl.Dock = DockStyle.Fill
' Build desired toolbars collection
Dim toolsBars() As Control = { StandardControls.CreateToolBar(ToolBarType.File, editorControl), StandardControls.CreateToolBar(ToolBarType.View, editorControl) }
' Put the toolbars collection into the editor
editorControl.Bars.Tools = toolsBarsShows how to initialize ruler, scrollbars and statusbar subcontrols.
[C#]
// Normally this code is generated by Visual Studio .NET when you drag and drop
// the editor control into your Windows Form, but you can also code it youself.
EditorControl editorControl = new EditorControl();
editorControl.Dock = DockStyle.Fill;
// Create standard horizontal ruler
editorControl.Bars.Rulers[0] = StandardControls.CreateRulerHorizontal();
// Create standard scrollbars
editorControl.Bars.Scrolls[0] = StandardControls.CreateScrollHorizontal();
editorControl.Bars.Scrolls[1] = StandardControls.CreateScrollVertical();
// Create standard status bar
editorControl.Bars.Status = StandardControls.CreateStatusBar();
[Visual Basic]
' Normally this code is generated by Visual Studio .NET when you drag and drop
' the editor control into your Windows Form, but you can also code it youself.
Dim editorControl As New EditorControl()
editorControl.Dock = DockStyle.Fill
' Create standard horizontal ruler
editorControl.Bars.Rulers(0) = StandardControls.CreateRulerHorizontal()
' Create standard scrollbars
editorControl.Bars.Scrolls(0) = StandardControls.CreateScrollHorizontal()
editorControl.Bars.Scrolls(1) = StandardControls.CreateScrollVertical()
' Create standard status bar
editorControl.Bars.Status = StandardControls.CreateStatusBar()
Requirements
Namespace: Aspose.Editor.Client
Assembly: Aspose.Editor.Client (in Aspose.Editor.Client.dll)
See Also
StandardControls Members | Aspose.Editor.Client Namespace | EditorBars | StandardMenuBar | StandardToolBar