One solution would be to simply get the number of pixels in a frame once during initialization and always use this value since it's unlikely that the number of pixels in a recorded frame will change.
For example, assuming you have a method called OnNewDepthReplay frame, you would do something like this (not tested, syntax might be off):
public void OnNewDepthReplayFrame(DepthReplayFrameEventArgs e) {
if (depthPixels == null) {
depthPixels = new new DepthImagePixel[eFramePixelDataLength];
}
// code that uses your depthPixels here
}
However, using the record/replay capabilities that come with the Kinect 1.5 and 1.6 SDKs might actually be a better option than using the Kinect Toolbox. I used to use Kinect Toolbox for it's recording/replay but then moved to Kinect Studio myself when Kinect for Windows v 1.5 came out. Here's a video on how to use Kinect Studio as well as a guide on MSDN.