Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / System / Windows / Automation / Peers / FlowDocumentPageViewerAutomationPeer.cs / 1 / 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
- counter.cs
- ForceCopyBuildProvider.cs
- DataTablePropertyDescriptor.cs
- CommandHelpers.cs
- ContainerVisual.cs
- XmlRawWriterWrapper.cs
- CompositionTarget.cs
- ThreadPool.cs
- ErrorLog.cs
- MobileCategoryAttribute.cs
- TableRow.cs
- MemberDescriptor.cs
- XsltLibrary.cs
- HierarchicalDataBoundControlAdapter.cs
- EmbeddedMailObject.cs
- Sql8ConformanceChecker.cs
- BaseResourcesBuildProvider.cs
- ClickablePoint.cs
- TypeEnumerableViewSchema.cs
- GeneralTransform3DCollection.cs
- Splitter.cs
- DescendentsWalker.cs
- FormsAuthenticationEventArgs.cs
- SqlWebEventProvider.cs
- SafeArrayRankMismatchException.cs
- ClientUtils.cs
- HttpStaticObjectsCollectionWrapper.cs
- ContextStack.cs
- COM2ColorConverter.cs
- FieldMetadata.cs
- UrlPath.cs
- XPathNodeHelper.cs
- _NegoState.cs
- PolyQuadraticBezierSegment.cs
- OracleConnectionString.cs
- TrackingExtract.cs
- Pkcs7Recipient.cs
- CacheRequest.cs
- ServiceHostingEnvironmentSection.cs
- Pipe.cs
- TdsValueSetter.cs
- BufferedGraphics.cs
- TriggerAction.cs
- EntityDataSourceContextCreatingEventArgs.cs
- PointKeyFrameCollection.cs
- BinaryParser.cs
- ConfigurationManager.cs
- QuadraticBezierSegment.cs
- WindowsImpersonationContext.cs
- DecryptedHeader.cs
- ObjectDataSourceChooseTypePanel.cs
- WebPartDisplayModeCollection.cs
- SignatureDescription.cs
- ScriptingAuthenticationServiceSection.cs
- ErrorTableItemStyle.cs
- PropertyChangingEventArgs.cs
- PropertyChangeTracker.cs
- IgnoreSectionHandler.cs
- MemberMaps.cs
- ImageCodecInfo.cs
- ValidatedControlConverter.cs
- WinCategoryAttribute.cs
- XmlSchemaComplexContent.cs
- AddInPipelineAttributes.cs
- KerberosRequestorSecurityToken.cs
- VideoDrawing.cs
- BypassElementCollection.cs
- DefaultValueAttribute.cs
- SerializationEventsCache.cs
- BaseServiceProvider.cs
- TerminatorSinks.cs
- MediaContextNotificationWindow.cs
- Scene3D.cs
- LicenseContext.cs
- Documentation.cs
- ControlParameter.cs
- FastEncoderWindow.cs
- HtmlControlPersistable.cs
- dataSvcMapFileLoader.cs
- WebPartTransformerCollection.cs
- WindowShowOrOpenTracker.cs
- ApplyImportsAction.cs
- LiteralControl.cs
- ObjectItemAssemblyLoader.cs
- BufferedStream.cs
- DesignerImageAdapter.cs
- OleDbRowUpdatedEvent.cs
- LinkClickEvent.cs
- AnonymousIdentificationSection.cs
- TransformationRules.cs
- _UriSyntax.cs
- XmlNodeReader.cs
- DesignerValidatorAdapter.cs
- RequestQueue.cs
- ClientSponsor.cs
- SqlConnectionFactory.cs
- Registry.cs
- PropertyTab.cs
- ResourceExpression.cs
- Content.cs