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
- NameSpaceExtractor.cs
- XsdValidatingReader.cs
- ProfileManager.cs
- FontInfo.cs
- XmlAutoDetectWriter.cs
- ObfuscationAttribute.cs
- TreeNodeBindingCollection.cs
- TargetParameterCountException.cs
- XmlNodeList.cs
- XmlObjectSerializer.cs
- ItemCollection.cs
- WebPartDisplayModeCancelEventArgs.cs
- ObjectAnimationUsingKeyFrames.cs
- EntityViewGenerationAttribute.cs
- XmlNodeChangedEventManager.cs
- GZipDecoder.cs
- DocumentPaginator.cs
- WindowPattern.cs
- PrintPageEvent.cs
- AnnotationMap.cs
- ToolStripHighContrastRenderer.cs
- TypefaceMetricsCache.cs
- BrowserCapabilitiesFactoryBase.cs
- SqlCommand.cs
- XmlWellformedWriter.cs
- LocatorPart.cs
- ComplexObject.cs
- InvokePatternIdentifiers.cs
- MatrixTransform.cs
- SchemaNotation.cs
- ListSortDescriptionCollection.cs
- XmlSchemaInferenceException.cs
- TextCompositionEventArgs.cs
- SiteMap.cs
- HtmlElementCollection.cs
- FrameworkReadOnlyPropertyMetadata.cs
- GridViewAutoFormat.cs
- RTLAwareMessageBox.cs
- HttpRawResponse.cs
- XslCompiledTransform.cs
- DrawingVisual.cs
- SqlCommandSet.cs
- TickBar.cs
- CheckedListBox.cs
- EntityKey.cs
- HttpCachePolicyElement.cs
- BamlBinaryWriter.cs
- GenerateHelper.cs
- StateBag.cs
- UserControlParser.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- CompModSwitches.cs
- ViewgenGatekeeper.cs
- DataError.cs
- SecurityTokenTypes.cs
- FrameworkObject.cs
- HybridWebProxyFinder.cs
- FontDifferentiator.cs
- DBConcurrencyException.cs
- TheQuery.cs
- ExecutionEngineException.cs
- TableProviderWrapper.cs
- Perspective.cs
- TypeNameParser.cs
- NetStream.cs
- MimeXmlImporter.cs
- RightNameExpirationInfoPair.cs
- WebPartConnectionsConfigureVerb.cs
- SmiEventSink_Default.cs
- XmlSchemaSimpleTypeRestriction.cs
- ConnectionPoolRegistry.cs
- TransformProviderWrapper.cs
- _SSPIWrapper.cs
- Rijndael.cs
- SiteMapNodeItemEventArgs.cs
- ProtectedConfiguration.cs
- DateTimeOffsetStorage.cs
- XmlArrayAttribute.cs
- PathGeometry.cs
- OrthographicCamera.cs
- PartialCachingControl.cs
- safesecurityhelperavalon.cs
- CalendarDataBindingHandler.cs
- ServicePointManager.cs
- StorageEntityTypeMapping.cs
- DataGridBoolColumn.cs
- TypedTableBase.cs
- CodeSnippetStatement.cs
- NullRuntimeConfig.cs
- XmlSchemaAttributeGroup.cs
- TagMapCollection.cs
- XmlValidatingReaderImpl.cs
- TextDecorationCollection.cs
- ToolStripPanelDesigner.cs
- ArraySegment.cs
- SerializationInfoEnumerator.cs
- HtmlTable.cs
- AutoResetEvent.cs
- ToolStripContentPanelRenderEventArgs.cs
- StatusBarPanelClickEvent.cs