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
- ScaleTransform.cs
- WebPartCatalogCloseVerb.cs
- MobileCategoryAttribute.cs
- IsolatedStorage.cs
- PropertyEntry.cs
- CustomAttributeBuilder.cs
- HttpContext.cs
- DescendantOverDescendantQuery.cs
- Publisher.cs
- DataGridViewHeaderCell.cs
- XmlSchemaSimpleTypeUnion.cs
- ShaderRenderModeValidation.cs
- JsonDeserializer.cs
- GcSettings.cs
- ButtonAutomationPeer.cs
- DefaultHttpHandler.cs
- CommandConverter.cs
- SettingsPropertyCollection.cs
- DrawingAttributes.cs
- SchemaMerger.cs
- EmptyCollection.cs
- SqlWebEventProvider.cs
- ObjectHandle.cs
- SymmetricAlgorithm.cs
- EntityType.cs
- XPathAncestorQuery.cs
- ItemCollection.cs
- VectorAnimation.cs
- LingerOption.cs
- InlineCategoriesDocument.cs
- MessagePartDescriptionCollection.cs
- Material.cs
- ProcessProtocolHandler.cs
- _SecureChannel.cs
- Rss20FeedFormatter.cs
- Timer.cs
- Utility.cs
- WebDescriptionAttribute.cs
- MutexSecurity.cs
- Ipv6Element.cs
- ConnectionPoint.cs
- LicenseManager.cs
- RegexParser.cs
- ObjectSecurity.cs
- VSDExceptions.cs
- XmlExtensionFunction.cs
- UriSectionReader.cs
- Blend.cs
- DictionarySectionHandler.cs
- CellQuery.cs
- CustomValidator.cs
- FixedHighlight.cs
- ObfuscationAttribute.cs
- WebDisplayNameAttribute.cs
- DataGridViewCheckBoxColumn.cs
- RichTextBoxAutomationPeer.cs
- DesignerToolboxInfo.cs
- XmlAnyElementAttribute.cs
- CredentialCache.cs
- DataMemberListEditor.cs
- VolatileEnlistmentState.cs
- SqlParameterCollection.cs
- WCFServiceClientProxyGenerator.cs
- RC2CryptoServiceProvider.cs
- RedistVersionInfo.cs
- InputReport.cs
- XmlSchemaComplexContent.cs
- LoadedOrUnloadedOperation.cs
- EnumBuilder.cs
- SafeNativeMethods.cs
- RSAOAEPKeyExchangeFormatter.cs
- FilteredDataSetHelper.cs
- RequestSecurityTokenResponseCollection.cs
- SqlCacheDependencyDatabase.cs
- XmlDataCollection.cs
- SQLInt16.cs
- DbModificationClause.cs
- ContentFilePart.cs
- GraphicsState.cs
- ValidationErrorCollection.cs
- Unit.cs
- ButtonColumn.cs
- SelectionListDesigner.cs
- RoleGroup.cs
- TokenFactoryFactory.cs
- ClientApiGenerator.cs
- RuntimeConfig.cs
- ProcessModelInfo.cs
- NativeCppClassAttribute.cs
- HttpRuntime.cs
- _RequestCacheProtocol.cs
- WsdlBuildProvider.cs
- PathSegment.cs
- CompressStream.cs
- ContentAlignmentEditor.cs
- StructuralType.cs
- _NtlmClient.cs
- DbConnectionStringCommon.cs
- SimplePropertyEntry.cs
- MetadataArtifactLoaderCompositeFile.cs