Simple logging dockable window with a custom context menu
How to use
See
How to use ArcGIS samples
for help on compiling, setting up the debugger, and running the sample.
If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders.
However, you will need to update the sample to point to the location of the data once you have extracted all the files.
Open and compile the sample project in Visual Studio. If needed, set up a debug application.
Open ArcCatalog, ArcMap, ArcScene, or ArcGlobe. Drag and drop the Show/Hide Log Window (VB .NET) or Show/Hide Log Window (C#) toggle command from the Customize dialog box under the .NET Samples category onto the application.
Click the command to show the dockable window.
Dock the window at various locations on the application window.
Float the dockable window.
Insert text into the list box by typing in the text box and press Enter.
In the Context Menu Option panel at the bottom of the dockable window, select the Pure .NET (Windows Forms) radio button and right-click the list box. A context menu from the Windows Forms ContextMenuStrip class is displayed.
Switch to the predefined (ArcObjects) option and right-click the list box again. A standard ArcGIS for Desktop context menu is displayed.
This predefined context menu can be customized interactively in the Customize dialog box. Click the Toolbars tab, check Context Menu and expand to show Logging Window Context Menu (VB .NET) or Logging Window Context Menu (C#). Reverse the order of the commands. After closing the dialog box, right-click the list box again to see your interactive change.
Switch to the Dynamic (ArcObjects) option and right-click the list box. It displays a similar ArcGIS for Desktop context menu that is created dynamically at run time that is not customizable.