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
- NotifyParentPropertyAttribute.cs
- Polygon.cs
- XmlEventCache.cs
- FixedSOMContainer.cs
- FilterableAttribute.cs
- XmlSchemaInfo.cs
- GetResponse.cs
- JoinGraph.cs
- CategoryNameCollection.cs
- StringToken.cs
- TimeSpanMinutesConverter.cs
- HeaderedItemsControl.cs
- DoubleCollection.cs
- WindowsFont.cs
- translator.cs
- Translator.cs
- Int32AnimationUsingKeyFrames.cs
- SatelliteContractVersionAttribute.cs
- TimeoutHelper.cs
- NamedServiceModelExtensionCollectionElement.cs
- PartialCachingControl.cs
- DSACryptoServiceProvider.cs
- ModelItemExtensions.cs
- ConfigXmlAttribute.cs
- WorkItem.cs
- RawContentTypeMapper.cs
- StaticResourceExtension.cs
- TemporaryBitmapFile.cs
- CharacterMetrics.cs
- AutoSizeComboBox.cs
- EntityDataSourceContainerNameConverter.cs
- BitmapDecoder.cs
- DataGridViewCellCollection.cs
- SqlException.cs
- GifBitmapEncoder.cs
- ConvertTextFrag.cs
- XXXInfos.cs
- PropertyDescriptorGridEntry.cs
- XmlNodeList.cs
- PathGradientBrush.cs
- DataViewSettingCollection.cs
- DataTemplateSelector.cs
- TagNameToTypeMapper.cs
- SqlMethodAttribute.cs
- BinaryMethodMessage.cs
- SuppressIldasmAttribute.cs
- SelectedDatesCollection.cs
- FixedFlowMap.cs
- _StreamFramer.cs
- dsa.cs
- PasswordPropertyTextAttribute.cs
- DataControlFieldCollection.cs
- OutputCacheProfileCollection.cs
- LoginUtil.cs
- VideoDrawing.cs
- FileUtil.cs
- ObjectDataSourceDisposingEventArgs.cs
- Span.cs
- QuaternionRotation3D.cs
- MailWebEventProvider.cs
- ApplicationException.cs
- OleServicesContext.cs
- SynchronizationLockException.cs
- SqlBooleanMismatchVisitor.cs
- SqlXml.cs
- GridItemCollection.cs
- VirtualizingPanel.cs
- TagNameToTypeMapper.cs
- RectangleGeometry.cs
- ReferenceSchema.cs
- ListViewCommandEventArgs.cs
- TraceUtility.cs
- DesignerDataSourceView.cs
- HtmlControlPersistable.cs
- CapabilitiesRule.cs
- AlgoModule.cs
- SystemIPGlobalStatistics.cs
- ManagementObjectCollection.cs
- IOThreadScheduler.cs
- Compiler.cs
- PenLineCapValidation.cs
- RemoveStoryboard.cs
- ErrorTableItemStyle.cs
- XmlCountingReader.cs
- controlskin.cs
- VectorCollectionConverter.cs
- HtmlInputText.cs
- MemberRestriction.cs
- TreeNode.cs
- FrameworkElement.cs
- GroupLabel.cs
- InkCanvasFeedbackAdorner.cs
- RightsManagementInformation.cs
- ReadOnlyPropertyMetadata.cs
- TextServicesLoader.cs
- MessageBox.cs
- ModelPerspective.cs
- BitmapEffectOutputConnector.cs
- AudioStateChangedEventArgs.cs
- EnumType.cs