Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- HttpListenerPrefixCollection.cs
- MenuEventArgs.cs
- TemplateControlCodeDomTreeGenerator.cs
- CodeNamespace.cs
- CacheMemory.cs
- CodeIterationStatement.cs
- VectorCollection.cs
- RoleService.cs
- InputScope.cs
- localization.cs
- PathGeometry.cs
- TimeoutConverter.cs
- OutputScopeManager.cs
- EDesignUtil.cs
- ButtonBaseAutomationPeer.cs
- HTMLTextWriter.cs
- HttpCachePolicyElement.cs
- SqlVisitor.cs
- PermissionSetEnumerator.cs
- HostedTransportConfigurationBase.cs
- TextEffect.cs
- Int32CollectionConverter.cs
- CodeMemberProperty.cs
- CodeDOMProvider.cs
- XmlBufferedByteStreamReader.cs
- SqlDesignerDataSourceView.cs
- MembershipUser.cs
- WebResponse.cs
- SecurityElement.cs
- SectionInput.cs
- BitStack.cs
- SystemResourceHost.cs
- BoolLiteral.cs
- NativeMethods.cs
- AuthenticationModulesSection.cs
- ItemsControl.cs
- OAVariantLib.cs
- WindowsContainer.cs
- SrgsNameValueTag.cs
- OleDbStruct.cs
- RemoteArgument.cs
- SplineKeyFrames.cs
- UInt64.cs
- UnmanagedMemoryStream.cs
- ChildDocumentBlock.cs
- DBSchemaRow.cs
- PersonalizationState.cs
- RegistryConfigurationProvider.cs
- QuaternionAnimation.cs
- FilterableAttribute.cs
- FlowLayoutSettings.cs
- XmlUnspecifiedAttribute.cs
- ExpressionPrinter.cs
- RawStylusInputCustomDataList.cs
- EdmToObjectNamespaceMap.cs
- Dump.cs
- StringHelper.cs
- GridViewCancelEditEventArgs.cs
- XPathNavigatorReader.cs
- WebPartPersonalization.cs
- unitconverter.cs
- SecurityPermission.cs
- EmbeddedMailObjectsCollection.cs
- ExecutionContext.cs
- ResourceAttributes.cs
- HierarchicalDataBoundControl.cs
- LockedHandleGlyph.cs
- BitArray.cs
- PropertyIdentifier.cs
- DataServiceHostFactory.cs
- XmlSchemaComplexContent.cs
- InputScopeAttribute.cs
- XmlLoader.cs
- SqlRetyper.cs
- PersonalizableTypeEntry.cs
- ArraySet.cs
- WebServiceResponseDesigner.cs
- HttpResponseInternalWrapper.cs
- AddValidationError.cs
- EmptyEnumerator.cs
- DragDropHelper.cs
- HyperLinkDataBindingHandler.cs
- HostProtectionPermission.cs
- ConfigLoader.cs
- TreeIterators.cs
- DataGridViewEditingControlShowingEventArgs.cs
- Literal.cs
- GenericRootAutomationPeer.cs
- EditorZoneBase.cs
- AutoSizeToolBoxItem.cs
- _ConnectionGroup.cs
- PagesChangedEventArgs.cs
- DesignerTransactionCloseEvent.cs
- SelectionWordBreaker.cs
- CircleHotSpot.cs
- EncryptedData.cs
- File.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ServiceDescription.cs
- BreadCrumbTextConverter.cs