Programming Guide: Embedded Frame Management

# Programming Guide

## Embedded Frame Management

- You control the sizes and locations of your embedded frames. Support frame negotiation, if appropriate, in your RequestFrameShape method. You need to reset embedded facet's clip shape.

- Be prepared to receive requests for additional frames from an embedded part. Implement your RequestEmbeddedFrame method, and handle calls to it as appropriate for your content model.

  If you add a requested frame, use the requested shape for both sizing and relative positioning of the frame, if your content model allows it. Normalize the frame shape that you return. Give the frame an appropriate group ID and sequence number.

  If you grant requests for additional embedded frames, implement your part's RemoveEmbeddedFrame method so that embedded parts can have you delete those frames when they are no longer needed.

- If you create an embedded frame that displays the same content in the same presentation as another embedded frame, use AttachSourceFrame to have the embedded part attach the new frame to the original (source) frame, so that updates in one will be reflected in the other.

- When you no longer need an embedded frame, permanently remove it by removing all of its facets, setting its containing frame to null, and calling Release or Remove method, as appropriate.

- Another part may request that you scroll your part's content to reveal an embedded frame. You may have to accomplish this by scrolling your own content, or by requesting that your containing part scroll its content. Implement your part's RevealFrame method to fulfill this request.

- Support undo of all embedded-frame manipulations.

Depending on your part's content model and features, you might want to add support for these capabilities:

- If you support sequenced frames, use frame groups to define sets of sequentially ordered embedded frames. Assign sequence numbers so that the embedded part can know in what order to fill its frames with content.

- If your content model suggests that you should make any of your content properties (such as, for example, text font or style) available for adoption by embedded parts, implement your AcquireContainingPartProperties method so that embedded parts can call it. Likewise, call your embedded parts' ContainingPartPropertiesUpdated method whenever you change any of your adoptable content properties.

- Whether or not you support linking, implement your part's LinkStatusChanged method, so that you can call your embedded frames' ChangeLinkStatus methods and communicate changes in your own display frame's link status.

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