Hi i am developing a custom panel for outlook. and i have a question, how can i autosize width and height the datagridview to the userControl?
This is what append:
Edit:
Microsoft.Office.Tools.CustomTaskPane taskPane;
Microsoft.Office.Interop.Outlook.Application applicationObject;
Outlook.Explorer explorer;
TaskPaneControl tpc;
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
explorer = this.Application.ActiveExplorer();
explorer.SelectionChange+=new Microsoft.Office.Interop.Outlook.ExplorerEvents_10_SelectionChangeEventHandler(explorer_SelectionChange);
}
void explorer_SelectionChange()
{
if (taskPane == null)
{
tpc=new TaskPaneControl();
taskPane = Globals.ThisAddIn.CustomTaskPanes.Add(tpc, "Sender Details", explorer);
taskPane.Visible = true;
taskPane.Width = 245;
return;
}
if (taskPane != null)
{
taskPane.Visible = true;
taskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionBottom;
taskPane.Height = 245;
}
}
}
And added a TaskPaneControl (userControl)