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
- EnterpriseServicesHelper.cs
- Application.cs
- xmlfixedPageInfo.cs
- Single.cs
- CorrelationManager.cs
- EncodingDataItem.cs
- RepeaterItem.cs
- PageContent.cs
- ConcurrentBag.cs
- Proxy.cs
- webeventbuffer.cs
- CoTaskMemSafeHandle.cs
- DockAndAnchorLayout.cs
- WebPart.cs
- CanonicalFormWriter.cs
- Int64KeyFrameCollection.cs
- PartialCachingAttribute.cs
- LookupBindingPropertiesAttribute.cs
- SourceLineInfo.cs
- SpellCheck.cs
- TraceProvider.cs
- Graph.cs
- FileFormatException.cs
- DocumentViewerBaseAutomationPeer.cs
- SafeProcessHandle.cs
- MediaEntryAttribute.cs
- SettingsAttributeDictionary.cs
- ExtendedProperty.cs
- X509CertificateCollection.cs
- WindowsScroll.cs
- WebConfigurationHostFileChange.cs
- SemanticBasicElement.cs
- SamlConditions.cs
- RtfNavigator.cs
- ToolboxComponentsCreatingEventArgs.cs
- RowsCopiedEventArgs.cs
- MenuCommand.cs
- SwitchAttribute.cs
- EdgeProfileValidation.cs
- MimeTypePropertyAttribute.cs
- TextDecoration.cs
- DataControlFieldCollection.cs
- SecurityPolicySection.cs
- MobileCapabilities.cs
- DoubleAnimation.cs
- MultiSelectRootGridEntry.cs
- QuestionEventArgs.cs
- ErrorHandlerModule.cs
- CustomCategoryAttribute.cs
- ExtensibleSyndicationObject.cs
- BehaviorService.cs
- PropertyEmitter.cs
- MediaElementAutomationPeer.cs
- DocumentStream.cs
- OdbcEnvironmentHandle.cs
- CollectionViewGroupInternal.cs
- Brush.cs
- HandleExceptionArgs.cs
- GridItemProviderWrapper.cs
- COM2PropertyDescriptor.cs
- StorageAssociationSetMapping.cs
- RSAOAEPKeyExchangeDeformatter.cs
- TdsParserStateObject.cs
- TopClause.cs
- HttpWrapper.cs
- AutomationPropertyInfo.cs
- TypedAsyncResult.cs
- KeyBinding.cs
- MD5.cs
- LongCountAggregationOperator.cs
- NullableConverter.cs
- FilterElement.cs
- DebuggerService.cs
- ComplexObject.cs
- LiteralLink.cs
- HwndSubclass.cs
- SchemaNotation.cs
- XPathSelfQuery.cs
- QilTypeChecker.cs
- ToolStripSplitStackLayout.cs
- MultiPropertyDescriptorGridEntry.cs
- HtmlElementErrorEventArgs.cs
- GuidelineSet.cs
- SmtpFailedRecipientsException.cs
- CalendarDataBindingHandler.cs
- SqlNodeAnnotations.cs
- ComponentEvent.cs
- SettingsPropertyIsReadOnlyException.cs
- NumberFormatter.cs
- SHA384Managed.cs
- MarkerProperties.cs
- ClientData.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- LinkLabel.cs
- CollectionEditVerbManager.cs
- DataDocumentXPathNavigator.cs
- AppendHelper.cs
- PDBReader.cs
- RemotingConfigParser.cs
- Freezable.cs