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
- LocatorPartList.cs
- LineBreakRecord.cs
- FormViewPagerRow.cs
- ContextInformation.cs
- AddressHeaderCollectionElement.cs
- DataBinding.cs
- ProvidePropertyAttribute.cs
- GetImportFileNameRequest.cs
- WebPartCollection.cs
- RelatedView.cs
- SafeCryptContextHandle.cs
- DataControlFieldsEditor.cs
- CreateRefExpr.cs
- BindingsCollection.cs
- WebPartsPersonalizationAuthorization.cs
- UInt64Storage.cs
- TimeEnumHelper.cs
- ObjectMaterializedEventArgs.cs
- ProfilePropertySettingsCollection.cs
- SecUtil.cs
- ListItem.cs
- WpfMemberInvoker.cs
- XhtmlBasicPageAdapter.cs
- ConfigXmlElement.cs
- RsaSecurityTokenAuthenticator.cs
- HttpCacheVaryByContentEncodings.cs
- Dispatcher.cs
- WriteableBitmap.cs
- PropertyMappingExceptionEventArgs.cs
- Context.cs
- Metadata.cs
- RootDesignerSerializerAttribute.cs
- DelayedRegex.cs
- Bezier.cs
- EncodingDataItem.cs
- UserNamePasswordValidator.cs
- RotateTransform3D.cs
- KnownColorTable.cs
- DateTimeFormat.cs
- Identity.cs
- UIAgentAsyncBeginRequest.cs
- ParagraphVisual.cs
- MissingManifestResourceException.cs
- HitTestWithGeometryDrawingContextWalker.cs
- ThreadStaticAttribute.cs
- HttpDebugHandler.cs
- FieldAccessException.cs
- PrintingPermissionAttribute.cs
- UpdatePanelControlTrigger.cs
- OutputCacheProfile.cs
- AdapterDictionary.cs
- LingerOption.cs
- DataException.cs
- BorderGapMaskConverter.cs
- SslStreamSecurityElement.cs
- SystemMulticastIPAddressInformation.cs
- ElementInit.cs
- XPathNodeList.cs
- UpdatableGenericsFeature.cs
- ImageAutomationPeer.cs
- ColumnMapProcessor.cs
- CmsUtils.cs
- IIS7UserPrincipal.cs
- KeysConverter.cs
- ConfigUtil.cs
- PolyBezierSegmentFigureLogic.cs
- TextStore.cs
- odbcmetadatacolumnnames.cs
- FacetEnabledSchemaElement.cs
- NonBatchDirectoryCompiler.cs
- CursorConverter.cs
- TypedTableGenerator.cs
- _TransmitFileOverlappedAsyncResult.cs
- CodeNamespaceImport.cs
- MasterPageParser.cs
- XmlNamespaceMapping.cs
- GatewayDefinition.cs
- SchemaComplexType.cs
- CharEnumerator.cs
- BitmapInitialize.cs
- ResourcesGenerator.cs
- AuthenticationServiceManager.cs
- AuthorizationPolicyTypeElementCollection.cs
- SafeNativeMethods.cs
- TimeSpanValidator.cs
- TypeConverterHelper.cs
- RepeaterItemCollection.cs
- ColumnCollection.cs
- FormsAuthenticationUser.cs
- Paragraph.cs
- lengthconverter.cs
- SqlCacheDependency.cs
- PixelFormat.cs
- TextEditorSelection.cs
- DataSourceXmlSerializationAttribute.cs
- IntSecurity.cs
- InstanceOwnerQueryResult.cs
- DATA_BLOB.cs
- ProfileProvider.cs
- CodeThrowExceptionStatement.cs