private void ctpConfig(CustomTaskPane customTaskPane, RecipientHlp_TaskPane userControl) { if (customTaskPane != null) { customTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionBottom; customTaskPane.Height = userControl.getMaxHeight() + getTitleHeightForCurrVersion(); customTaskPane.Control.SizeChanged += Control_SizeChanged; customTaskPane.Visible = false; } }
private void addCtpToWindow(Object window, MailItem mailItem) { //add new ctp only if there is none added already if (window != null && this.ctpWindowWrapper.getCtpOf(window) == null) { RecipientHlp_TaskPane userControl = new RecipientHlp_TaskPane(); CustomTaskPane customTaskPane = this.CustomTaskPanes.Add(userControl, Strings.rechlp_titleBar_title, window); this.ctpWindowWrapper.add(window, customTaskPane); this.mailItemWindowWrapper.add(window, mailItem); ctpConfig(customTaskPane, userControl); } }