You should create a user control. Put some UI controls( in the solution I put a textbox and a button ) on that user controls as well as event handling. On the startup, ThisAddin adds the user control to the custom task pane.
Check out the sample solution I created on the following link
PowerPoint Snap-In
… or use the following snippets. In ThisAddin.cs add two privates, one of type CustomTaskPane and the other of UserControl.
// User control
private UserControl _usr;
// Custom task pane
private Microsoft.Office.Tools.CustomTaskPane _myCustomTaskPane;
Create the user control. From the Project menu, choose 'Add User Control'. Add some UI elements to the user control ( e.g. textboxes, buttons, etc. )
Finally, in ThisAddin_Startup event handler that is created automatically for you by choosing Office VSTO project types, add following lines.
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
//Create an instance of the user control
_usr =new UserControl1();
// Connect the user control and the custom task pane
_myCustomTaskPane = CustomTaskPanes.Add(_usr, "My Task Pane");
_myCustomTaskPane.Visible = true;
}
The result is shown in the image below
More about Office VSTO on this link Office Development in Visual Studio