Basic useful feature list:
Services:
- DteService
- MsgBoxService
- PaneService
- ServiceLocator
Core:
- BaseEditorFactory
- BaseEditorPane
- BaseWinFormsEditorPane
- BaseWpfEditorPane
public sealed class WinFormsEditorFactory
: BaseEditorFactory<WinFormsEditorEditorPane>
{
}
public class WinFormsEditorEditorPane
: BaseWinFormsEditorPane<WinFormsEditorFactory, Controls.WinForms.WinFormUserControl>
{
#region Methods
protected override string GetFileExtension()
{
return ".myExtension";
}
protected override void LoadFile(string fileName)
{}
protected override void SaveFile(string fileName)
{}
#endregion Methods
}
Package registration:
[ProvideEditorExtension(typeof(Editors.WinFormsEditorFactory), ".myExtension", 50,
ProjectGuid = "7D346946-3421-48C0-A98A-20790CB68B3C", NameResourceID = 133,
TemplateDir = @".\NullPath")]
public sealed class VSPackageCustomEditors : Package
{
protected override void Initialize()
{
base.Initialize();
/*
* Registering editor with WinForms control
* *.myExtension
*/
base.RegisterEditorFactory(new Editors.WinFormsEditorFactory());
}
}
\src\VSIXProject_Editor
This project is licensed under the MIT License