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
- SelectionItemProviderWrapper.cs
- ClientSettingsStore.cs
- MessageBox.cs
- ObjectDataSourceDisposingEventArgs.cs
- ResourceProviderFactory.cs
- HttpModule.cs
- XmlName.cs
- UniqueConstraint.cs
- RequiredAttributeAttribute.cs
- DocumentViewerAutomationPeer.cs
- XmlWriterSettings.cs
- CodePropertyReferenceExpression.cs
- TreeViewImageKeyConverter.cs
- VersionedStream.cs
- QuotedPrintableStream.cs
- MatrixTransform.cs
- EntityContainer.cs
- ControlParameter.cs
- GC.cs
- StatusBar.cs
- Rect3DConverter.cs
- CloseSequenceResponse.cs
- DataGrid.cs
- BuiltInExpr.cs
- FlowDocumentPage.cs
- TimeoutValidationAttribute.cs
- ModelPropertyDescriptor.cs
- TypeUtil.cs
- StateMachineDesignerPaint.cs
- XPathNavigatorKeyComparer.cs
- XmlJsonReader.cs
- SignedXml.cs
- RequiredFieldValidator.cs
- FixedHyperLink.cs
- BasicDesignerLoader.cs
- ping.cs
- DesignTableCollection.cs
- EdmPropertyAttribute.cs
- FontStyle.cs
- Msec.cs
- SelectionRange.cs
- HtmlInputReset.cs
- RenderData.cs
- WindowsStatusBar.cs
- webeventbuffer.cs
- TableLayoutStyle.cs
- UrlMappingsModule.cs
- TextRangeEditLists.cs
- ListBase.cs
- SystemIcons.cs
- ParallelRangeManager.cs
- PhonemeConverter.cs
- DataPagerFieldCommandEventArgs.cs
- SqlParameter.cs
- GradientBrush.cs
- SendingRequestEventArgs.cs
- BaseValidatorDesigner.cs
- relpropertyhelper.cs
- DetailsViewUpdatedEventArgs.cs
- TcpAppDomainProtocolHandler.cs
- ContractNamespaceAttribute.cs
- KeyedCollection.cs
- SoapElementAttribute.cs
- RubberbandSelector.cs
- ListViewItemEventArgs.cs
- QuestionEventArgs.cs
- Query.cs
- ObjectHandle.cs
- PanelDesigner.cs
- ManagementObjectSearcher.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- WebPartDisplayModeCollection.cs
- DataBoundControl.cs
- MatrixStack.cs
- TabItemAutomationPeer.cs
- HttpModuleActionCollection.cs
- PolyBezierSegmentFigureLogic.cs
- NavigationExpr.cs
- BasicHttpSecurityMode.cs
- CodeBlockBuilder.cs
- PixelFormats.cs
- TreeNodeSelectionProcessor.cs
- TypeSystem.cs
- PersonalizationProvider.cs
- CodeEntryPointMethod.cs
- ObjectKeyFrameCollection.cs
- ThicknessAnimationBase.cs
- SystemResources.cs
- PeerUnsafeNativeCryptMethods.cs
- GetPageCompletedEventArgs.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- XmlMemberMapping.cs
- ApplicationServiceManager.cs
- SchemaObjectWriter.cs
- AttributeCollection.cs
- Tuple.cs
- OleDragDropHandler.cs
- Polygon.cs
- TailCallAnalyzer.cs
- TaskExtensions.cs