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
- RecordsAffectedEventArgs.cs
- Object.cs
- Vector3DIndependentAnimationStorage.cs
- WebBaseEventKeyComparer.cs
- EntityStoreSchemaGenerator.cs
- Tag.cs
- BitmapMetadata.cs
- Point3DKeyFrameCollection.cs
- DoubleLinkListEnumerator.cs
- _ConnectOverlappedAsyncResult.cs
- SqlReferenceCollection.cs
- BufferedOutputAsyncStream.cs
- Model3DCollection.cs
- SiteMapSection.cs
- SystemColorTracker.cs
- ProfilePropertySettings.cs
- TypedDataSetSchemaImporterExtension.cs
- OrderToken.cs
- StrongNameMembershipCondition.cs
- IntegerValidatorAttribute.cs
- TimeoutException.cs
- CardSpacePolicyElement.cs
- LinearKeyFrames.cs
- TextInfo.cs
- SQLBytesStorage.cs
- SqlComparer.cs
- Fault.cs
- BoolExpr.cs
- Block.cs
- StrokeNode.cs
- XmlDocument.cs
- ComponentGlyph.cs
- ValidationHelpers.cs
- BaseValidator.cs
- Utils.cs
- ExternalCalls.cs
- ProxyHwnd.cs
- HostingEnvironmentSection.cs
- XmlDocumentFragment.cs
- FunctionCommandText.cs
- FreezableOperations.cs
- BamlStream.cs
- EntitySqlQueryCacheEntry.cs
- HideDisabledControlAdapter.cs
- ConcurrentStack.cs
- SmiEventStream.cs
- XmlIlVisitor.cs
- TemplateParser.cs
- datacache.cs
- RenderDataDrawingContext.cs
- WindowsAltTab.cs
- EnumValidator.cs
- BaseTemplateCodeDomTreeGenerator.cs
- DataGridViewCellCollection.cs
- SystemResourceHost.cs
- ReaderWriterLockSlim.cs
- PropertyGeneratedEventArgs.cs
- HttpGetProtocolReflector.cs
- FirewallWrapper.cs
- SchemaTypeEmitter.cs
- SqlClientPermission.cs
- PreProcessor.cs
- SqlWebEventProvider.cs
- SoapRpcMethodAttribute.cs
- SoapReflectionImporter.cs
- RectAnimationBase.cs
- xmlsaver.cs
- SqlCachedBuffer.cs
- SqlServices.cs
- XmlSerializationReader.cs
- CompareInfo.cs
- SectionInput.cs
- DataGridViewLayoutData.cs
- ResourcePermissionBase.cs
- SourceElementsCollection.cs
- HostExecutionContextManager.cs
- SplayTreeNode.cs
- QilPatternFactory.cs
- ErrorTableItemStyle.cs
- Parameter.cs
- RelationshipEndCollection.cs
- LambdaCompiler.Unary.cs
- SuppressMergeCheckAttribute.cs
- WebReferencesBuildProvider.cs
- FastEncoder.cs
- ResourceSetExpression.cs
- StreamWithDictionary.cs
- MetadataItemCollectionFactory.cs
- DispatcherHookEventArgs.cs
- CollectionAdapters.cs
- GridViewUpdateEventArgs.cs
- TrackingMemoryStreamFactory.cs
- SerialErrors.cs
- Literal.cs
- XmlUtil.cs
- SessionStateSection.cs
- LiteralControl.cs
- ProcessProtocolHandler.cs
- DataGridViewRowEventArgs.cs
- AppDomainEvidenceFactory.cs