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
- EmbeddedMailObjectsCollection.cs
- Configuration.cs
- DiscoveryClientDocuments.cs
- followingsibling.cs
- WebPartDescriptionCollection.cs
- ListManagerBindingsCollection.cs
- XPathConvert.cs
- ActivityUtilities.cs
- PromptEventArgs.cs
- ToolStripContextMenu.cs
- EntityContainer.cs
- ReverseInheritProperty.cs
- XmlIncludeAttribute.cs
- EventSourceCreationData.cs
- BitmapEffectOutputConnector.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- FixedFlowMap.cs
- ToolStripItem.cs
- ApplyImportsAction.cs
- ListViewCommandEventArgs.cs
- ValidationHelpers.cs
- DebugView.cs
- RequestStatusBarUpdateEventArgs.cs
- QilGeneratorEnv.cs
- EnumerableRowCollection.cs
- StoreItemCollection.cs
- xmlformatgeneratorstatics.cs
- DBBindings.cs
- TextAdaptor.cs
- ThemeDictionaryExtension.cs
- ScrollableControl.cs
- NullRuntimeConfig.cs
- OrderByLifter.cs
- MenuItemAutomationPeer.cs
- MethodBody.cs
- UserUseLicenseDictionaryLoader.cs
- RegistrationServices.cs
- SizeIndependentAnimationStorage.cs
- ListItemCollection.cs
- ConsoleCancelEventArgs.cs
- basenumberconverter.cs
- ParallelTimeline.cs
- EnumerableRowCollectionExtensions.cs
- VariableQuery.cs
- Peer.cs
- TextBoxView.cs
- RichTextBox.cs
- RegistryKey.cs
- Quaternion.cs
- EndpointConfigContainer.cs
- PersonalizationProviderHelper.cs
- ProcessModule.cs
- LongMinMaxAggregationOperator.cs
- ResourceAssociationSetEnd.cs
- CardSpaceShim.cs
- DataGridCellItemAutomationPeer.cs
- RenderData.cs
- XmlNamespaceManager.cs
- EntitySqlQueryState.cs
- CodeNamespaceCollection.cs
- TemplatePartAttribute.cs
- TdsParserStateObject.cs
- WebRequest.cs
- COM2IPerPropertyBrowsingHandler.cs
- HttpConfigurationSystem.cs
- XPathConvert.cs
- Decimal.cs
- CodeLinePragma.cs
- MemberInfoSerializationHolder.cs
- XmlName.cs
- AssemblyEvidenceFactory.cs
- SQLInt64.cs
- ProgramNode.cs
- ActivityBindForm.Designer.cs
- PrintDialog.cs
- LinqDataSource.cs
- ListViewGroupItemCollection.cs
- DataMemberAttribute.cs
- CompositeFontFamily.cs
- LinqDataSourceView.cs
- HttpWebRequestElement.cs
- WindowsListViewItemStartMenu.cs
- AttributeCollection.cs
- FastPropertyAccessor.cs
- ClientEventManager.cs
- SaveCardRequest.cs
- MatrixStack.cs
- DataKeyArray.cs
- ErrorRuntimeConfig.cs
- ArrayWithOffset.cs
- XsdDateTime.cs
- FilterableAttribute.cs
- XmlSchemaInclude.cs
- TypeValidationEventArgs.cs
- JumpTask.cs
- UrlAuthorizationModule.cs
- LabelAutomationPeer.cs
- XmlLinkedNode.cs
- HttpRuntime.cs
- StyleTypedPropertyAttribute.cs