Programming Guide: Content Model and Storage

# Programming Guide

## Content Model and Storage

- Add embedding to your part's content model. Create a content element that you can track and manipulate to represent an embedded frame. You might create a proxy object that can represent a frame in both its stored and in-memory state.

- Maintain a list of the frames embedded in your part. Implement an iterator (a subclass of ODEmbeddedFramesIterator) to allow callers access to the frame objects in the list. Implement your part's CreateEmbeddedFramesIterator method, through which callers instantiate the class.

- When you write your part to storage, write persistent references to your embedded frames into your part's content stream. Do not write them into a separate property. When you read your part from storage, reconstruct your embedded frames from the stored persistent references in your content.

  Note:

  > For efficiency, you can use lazy instantiation. Create a frame object for each embedded frame only when you need to display it.

[ Top | Previous | Next | Contents | Index | Documentation Homepage ]