Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / FlowDocumentPageViewerAutomationPeer.cs / 1305600 / FlowDocumentPageViewerAutomationPeer.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: FlowDocumentPageViewerAutomationPeer.cs // // Description: AutomationPeer associated with FlowDocumentPageViewer. // //--------------------------------------------------------------------------- using System.Collections.Generic; // Listusing System.Windows.Controls; // FlowDocumentPageViewer using MS.Internal.Documents; // IFlowDocumentView namespace System.Windows.Automation.Peers { /// /// AutomationPeer associated with FlowDocumentPageViewer. /// public class FlowDocumentPageViewerAutomationPeer : DocumentViewerBaseAutomationPeer { ////// Constructor. /// /// Owner of the AutomationPeer. public FlowDocumentPageViewerAutomationPeer(FlowDocumentPageViewer owner) : base(owner) { } ////// ////// /// AutomationPeer associated with DocumentViewerBase returns an AutomationPeer /// for hosted Document and for elements in the style. /// protected override ListGetChildrenCore() { // Get children for all elements in the style. List children = base.GetChildrenCore(); // If the owner is IFlowDocumentViewer, it means that it is embedded inside // FlowDocumentReaer. In this case DocumentAutumationPeer is already exposed. // Hence need to remove it from children collection. if (Owner is IFlowDocumentViewer && children != null && children.Count > 0) { if (children[children.Count-1] is DocumentAutomationPeer) { children.RemoveAt(children.Count - 1); if (children.Count == 0) { children = null; } } } return children; } /// /// protected override string GetClassNameCore() { return "FlowDocumentPageViewer"; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: FlowDocumentPageViewerAutomationPeer.cs // // Description: AutomationPeer associated with FlowDocumentPageViewer. // //--------------------------------------------------------------------------- using System.Collections.Generic; // List/// using System.Windows.Controls; // FlowDocumentPageViewer using MS.Internal.Documents; // IFlowDocumentView namespace System.Windows.Automation.Peers { /// /// AutomationPeer associated with FlowDocumentPageViewer. /// public class FlowDocumentPageViewerAutomationPeer : DocumentViewerBaseAutomationPeer { ////// Constructor. /// /// Owner of the AutomationPeer. public FlowDocumentPageViewerAutomationPeer(FlowDocumentPageViewer owner) : base(owner) { } ////// ////// /// AutomationPeer associated with DocumentViewerBase returns an AutomationPeer /// for hosted Document and for elements in the style. /// protected override ListGetChildrenCore() { // Get children for all elements in the style. List children = base.GetChildrenCore(); // If the owner is IFlowDocumentViewer, it means that it is embedded inside // FlowDocumentReaer. In this case DocumentAutumationPeer is already exposed. // Hence need to remove it from children collection. if (Owner is IFlowDocumentViewer && children != null && children.Count > 0) { if (children[children.Count-1] is DocumentAutomationPeer) { children.RemoveAt(children.Count - 1); if (children.Count == 0) { children = null; } } } return children; } /// /// protected override string GetClassNameCore() { return "FlowDocumentPageViewer"; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BreakRecordTable.cs
- ChannelTraceRecord.cs
- listitem.cs
- StatusBarAutomationPeer.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- BStrWrapper.cs
- FormViewDeleteEventArgs.cs
- QilPatternFactory.cs
- CfgRule.cs
- OuterGlowBitmapEffect.cs
- PasswordTextContainer.cs
- EpmCustomContentWriterNodeData.cs
- XmlCharType.cs
- PopupControlService.cs
- Rfc4050KeyFormatter.cs
- MapPathBasedVirtualPathProvider.cs
- NumberFunctions.cs
- InvokeBase.cs
- XmlSchema.cs
- EventMetadata.cs
- ThreadAbortException.cs
- ToolBar.cs
- OdbcEnvironment.cs
- TextReader.cs
- XamlStream.cs
- DbParameterHelper.cs
- DriveInfo.cs
- XmlSchemaResource.cs
- XsltArgumentList.cs
- ServiceXNameTypeConverter.cs
- SkewTransform.cs
- FunctionImportMapping.cs
- ModelService.cs
- ActionItem.cs
- VirtualStackFrame.cs
- WebPartCancelEventArgs.cs
- XsdValidatingReader.cs
- SafeReversePInvokeHandle.cs
- Parameter.cs
- HashHelper.cs
- ConfigXmlSignificantWhitespace.cs
- WorkflowTraceTransfer.cs
- XmlIterators.cs
- XsltContext.cs
- WpfKnownMember.cs
- FixedSOMTableCell.cs
- PreProcessInputEventArgs.cs
- XmlDownloadManager.cs
- HMACRIPEMD160.cs
- ListViewSortEventArgs.cs
- PropertyValueUIItem.cs
- RawKeyboardInputReport.cs
- Scripts.cs
- EdmPropertyAttribute.cs
- MessageBox.cs
- Effect.cs
- SqlTypeSystemProvider.cs
- Rectangle.cs
- GradientBrush.cs
- SoapSchemaMember.cs
- DefaultEvaluationContext.cs
- ObjectSpanRewriter.cs
- ObjectQueryProvider.cs
- ResourceExpressionEditorSheet.cs
- SerialReceived.cs
- SchemaAttDef.cs
- BaseTransportHeaders.cs
- IdentityHolder.cs
- DoubleLinkListEnumerator.cs
- SmtpTransport.cs
- TextPattern.cs
- ExecutionScope.cs
- ScopedKnownTypes.cs
- InputLanguageCollection.cs
- HtmlHead.cs
- FunctionNode.cs
- BoolExpression.cs
- DataView.cs
- DataContractSerializer.cs
- Rect3D.cs
- DataGridColumnHeadersPresenter.cs
- MsmqIntegrationBinding.cs
- ToRequest.cs
- PathFigureCollectionConverter.cs
- ProtocolsConfigurationHandler.cs
- TemplatedWizardStep.cs
- XmlSchemaFacet.cs
- FormattedTextSymbols.cs
- TaskFactory.cs
- DocumentViewerBase.cs
- PauseStoryboard.cs
- MenuAdapter.cs
- DataBoundControlHelper.cs
- BigInt.cs
- XamlParser.cs
- Canvas.cs
- OdbcEnvironment.cs
- FrameSecurityDescriptor.cs
- PeerNameRegistration.cs