Hi all,
I tried to run C:\Program Files\Microsoft Visual Studio 2008 SDK\VisualStudioIntegration\Samples\IDE\CSharp\Example.EditorWithToolBox\EditorWithToolBox.sln and found two issues:
1. ToolboxItem "Toolbox Sample Item" add on ToolboxTab "Toolbox Test" every time when I open a some *.tbx-file (need only when I first open)
2. I run in debug-mode EditorWithToolBox-solution, stop debugging, run again and try drag-n-drop ToolboxItem from ToolBox to Editor - error "Object reference not set to an instance of an object". In debuger I can see:
Help me, please!
I tried to run C:\Program Files\Microsoft Visual Studio 2008 SDK\VisualStudioIntegration\Samples\IDE\CSharp\Example.EditorWithToolBox\EditorWithToolBox.sln and found two issues:
1. ToolboxItem "Toolbox Sample Item" add on ToolboxTab "Toolbox Test" every time when I open a some *.tbx-file (need only when I first open)
2. I run in debug-mode EditorWithToolBox-solution, stop debugging, run again and try drag-n-drop ToolboxItem from ToolBox to Editor - error "Object reference not set to an instance of an object". In debuger I can see:
void OnDragDrop(object sender, DragEventArgs e)
{
e.Effect = DragDropEffects.None;
// The only drop allow is from the toolbox item
if (e.Data.GetDataPresent(typeof(ToolboxItemData)))
{
ToolboxItemData data = (ToolboxItemData)e.Data.GetData(typeof(ToolboxItemData));
editorControl.Text += data.Content;
e.Effect = DragDropEffects.Copy;
}
}
in line editorControl.Text += data.Content data = nullHelp me, please!