c# - When Resizing Custom Task Pane It is Flickring ,Working Fine in Word 2010 but in Word 2013 it is Flickring -
public void flow_resize(object sender, painteventargs e) { flowlayoutpanel flow = sender flowlayoutpanel; var item = listctpmgr.firstordefault(o => o.flp.name == flow.name); if (item == null) return; addedctp = (microsoft.office.tools.customtaskpane)item.ctp; if (addedctp == null) return; toolstrip _toolstrip = (toolstrip)flow.controls[0]; int maxbuttonwidthforthistoolbar = 0; foreach (toolstripitem toolstripitem in _toolstrip.items) { if ((toolstripitem.width) > maxbuttonwidthforthistoolbar) { maxbuttonwidthforthistoolbar = (toolstripitem.width); } } maxbuttonwidthforthistoolbar += 10; if (addedctp.dockposition == msoctpdockposition.msoctpdockpositionleft || addedctp.dockposition == msoctpdockposition.msoctpdockpositionright) { if (addedctp.width < maxbuttonwidthforthistoolbar) addedctp.width = maxbuttonwidthforthistoolbar; } else if (addedctp.dockposition == msoctpdockposition.msoctpdockpositiontop || addedctp.dockposition == msoctpdockposition.msoctpdockpositionbottom) { addedctp.height = 50; } else { addedctp.width = _toolstrip.width + 27; addedctp.height = _toolstrip.height + 57; } }
above custom task pane code working fine in word 2010 in word 2013 flickring..please ....i used resize , sizechange also...
Comments
Post a Comment