excel - How can a Custom Task Pane toggle visibility whilst keeping the UI responsive? -
i'm trying add custom task pane in excel add-in intended work pivot tables pane.
the intention when table selected custom pane should appear , should disappear. this, i've created custom task pane:
this._taskpane = globals.addin.customtaskpanes.add( new tabletaskpane(), "foopane"); this._taskpane.dockpositionrestrict = msoctpdockpositionrestrict.msoctpdockpositionrestrictnohorizontal;
when table selected pane made visible, , when deselected pane hidden:
listobject table = addtable(); // creates table , populates data. table.selected += range => this._taskpane.visible = true; table.deselected += range => this._taskpane.visible = false;
this achieves effect of showing , hiding pane, unfortunately generates lag in ui, cursor "bounces" between cells task pane transitions between visibility states.
this seems because setter of visible
property blocks until task pane completes transition. in excel 2013, slides out side of window, takes around 500ms.
i can't see way change behaviour - i've tried scheduling property-setting on sta thread, causes same blocking. i'd happy change task pane appears without transition (like pivot table pane), don't see make happen either.
am doing incorrectly? there way fix direct com or other subtly-hidden behaviour?
you can accomplish (and more performance improvements) turning off silly windows animation features found here: control panel -> system , security -> system -> advanced settings -> performance settings -> visual effects.
in particular case, believe need turn off one:
- animate controls , elements inside windows.
but these great speeding things up:
- fade or slide menus view
- slide open combo boxes
- animate windows when minimizing , maximizing.
Comments
Post a Comment