Gets or sets an object that enables customization of appearance, effects, or other style characteristics that will apply to this element when it captures keyboard focus. (Inherited from FrameworkContentElement.)

Gets a value indicating whether this element has been initialized, either by being loaded as Extensible Application Markup Language (XAML), or by explicitly having its EndInit method called. (Inherited from FrameworkContentElement.)

Gets or sets the identifying name of the element. The name provides an instance reference so that programmatic code-behind, such as event handler code, can refer to an element once it is constructed during parsing of XAML. (Inherited from FrameworkContentElement.)

Adds a routed event handler for a specified routed event, adding the handler to the handler collection on the current element. Specify handledEventsToo as true to have the provided handler be invoked for routed event that had already been marked as handled by another element along the event route. (Inherited from ContentElement.)

Starts a specific animation for a specified animated property on this element, with the option of specifying what happens if the property already has a running animation. (Inherited from ContentElement.)

Begins the sequence of actions that are contained in the provided storyboard, with options specified for what should occur if the property is already animated. (Inherited from FrameworkContentElement.)

Coerces the value of the specified dependency property. This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject. (Inherited from DependencyObject.)

Invoked when an unhandled DragDrop.DragEnter attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled DragDrop.DragLeave attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled DragDrop.DragOver attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled DragDrop.DragEnter attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled DragDrop.GiveFeedback attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Keyboard.GotKeyboardFocus attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Mouse.GotMouseCapture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.GotStylusCapture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Keyboard.KeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Keyboard.KeyUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Keyboard.LostKeyboardFocus attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Mouse.LostMouseCapture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.LostStylusCapture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Mouse.MouseDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled MouseLeftButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Mouse.MouseMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled MouseRightButtonDown routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled MouseRightButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Mouse.MouseUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Mouse.MouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled DragDrop.PreviewDragEnter attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled DragDrop.PreviewDragLeave attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled DragDrop.PreviewDragOver attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled DragDrop.PreviewDrop attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled DragDrop.PreviewGiveFeedback attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Keyboard.PreviewGotKeyboardFocus attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Keyboard.PreviewKeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Keyboard.PreviewKeyUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Keyboard.PreviewKeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Mouse.PreviewMouseDown attached routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled PreviewMouseLeftButtonDown routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled PreviewMouseLeftButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Mouse.PreviewMouseMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled PreviewMouseRightButtonDown routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled PreviewMouseRightButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Mouse.PreviewMouseUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Mouse.PreviewMouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.PreviewStylusButtonDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.PreviewStylusButtonUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.PreviewStylusDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.PreviewStylusInAirMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.PreviewStylusInRange attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.PreviewStylusMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.PreviewStylusOutOfRange attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.PreviewStylusUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled DragDrop.QueryContinueDrag attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Mouse.QueryCursor attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.StylusButtonDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.StylusButtonUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.StylusDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.StylusInAirMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.StylusInRange attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.StylusMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.StylusOutOfRange attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.StylusSystemGesture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled Stylus.StylusUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Invoked when an unhandled TextCompositionManager.TextInput attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. (Inherited from ContentElement.)

Determines the next element that would receive focus relative to this element for a provided focus movement direction, but does not actually move the focus. This method is sealed and cannot be overridden. (Inherited from FrameworkContentElement.)

Occurs when the stylus moves while over the element. The stylus must move while being detected by the digitizer to raise this event, otherwise, PreviewStylusInAirMove is raised instead. (Inherited from ContentElement.)

Occurs when the cursor is requested to display. This event is raised on an element each time that the mouse pointer moves to a new location, which means the cursor object might need to be changed based on its new position. (Inherited from ContentElement.)

FixedDocumentSequence hosts an ordered sequence of one or more fixed documents that are organized as a single unit.

DocumentReference is the only allowable child element in a FixedDocumentSequence. Each DocumentReference refers to a single FixedDocument. Document reference elements must be in sequential order, matching the order in which the fixed documents are processed.

// ------------------------- LoadDocumentViewer ----------------------- ///<summary>/// Loads content from a file to a DocumentViewer control.</summary> ///<param name="xpsFilename">/// The path and name of the XPS file to /// load to the DocumentViewer control.</param> ///<remarks>/// Exception handling should be added if the xpsFilename may not be /// valid or if the FixedDocumentSequence contained in the file is /// incorrect. (In this sample the files are hardcoded.)</remarks> privatevoid LoadDocumentViewer(string xpsFilename)
{
// Save a reference to the currently open XPS package.
XpsDocument oldXpsPackage = _xpsPackage;
// Open the package for the new XPS document.
_xpsPackage = new XpsDocument(xpsFilename,
FileAccess.Read, CompressionOption.NotCompressed);
// Get the FixedDocumentSequence from the package.
FixedDocumentSequence fixedDocumentSequence =
_xpsPackage.GetFixedDocumentSequence();
// Set the new FixedDocumentSequence as // the DocumentViewer's paginator source.
docViewer.Document =
fixedDocumentSequence as IDocumentPaginatorSource;
// If there was an old XPS package, close it now that // DocumentViewer no longer needs to access it. if (oldXpsPackage != null)
oldXpsPackage.Close();
// Leave the new _xpsPackage open for DocumentViewer // to access additional required resources.
}// end:LoadDocumentViewer()