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
- ErrorWrapper.cs
- DispatchChannelSink.cs
- RectAnimationBase.cs
- SecurityDocument.cs
- Utility.cs
- SettingsPropertyIsReadOnlyException.cs
- KnownTypeAttribute.cs
- CombinedGeometry.cs
- RtfToXamlReader.cs
- CodeDirectiveCollection.cs
- PointKeyFrameCollection.cs
- TemplateComponentConnector.cs
- CheckBoxBaseAdapter.cs
- StatusBarAutomationPeer.cs
- TrustSection.cs
- HandlerWithFactory.cs
- SettingsProperty.cs
- HitTestWithGeometryDrawingContextWalker.cs
- BitmapSourceSafeMILHandle.cs
- WsdlImporter.cs
- FrameworkContentElement.cs
- GregorianCalendarHelper.cs
- DataBindingCollection.cs
- PolicyReader.cs
- Point.cs
- WindowsRegion.cs
- ContainerUIElement3D.cs
- SingleTagSectionHandler.cs
- StructuredTypeEmitter.cs
- ListParagraph.cs
- DataGridCaption.cs
- CodeArgumentReferenceExpression.cs
- CompiledIdentityConstraint.cs
- ToolStripItem.cs
- TemplateBindingExtension.cs
- ActivityExecutor.cs
- UnmanagedMemoryStreamWrapper.cs
- CachedBitmap.cs
- DateTimeHelper.cs
- MessageDesigner.cs
- DataBoundLiteralControl.cs
- TreeViewItemAutomationPeer.cs
- RuntimeIdentifierPropertyAttribute.cs
- BackgroundFormatInfo.cs
- ProcessModuleCollection.cs
- Pool.cs
- SelectionItemProviderWrapper.cs
- FileUpload.cs
- ResourceDisplayNameAttribute.cs
- OutputWindow.cs
- ControlFilterExpression.cs
- HandlerBase.cs
- IdentityModelStringsVersion1.cs
- And.cs
- WindowsImpersonationContext.cs
- EntityProviderFactory.cs
- XmlUrlResolver.cs
- BoundPropertyEntry.cs
- NavigationCommands.cs
- LinqDataSourceContextEventArgs.cs
- rsa.cs
- SqlProvider.cs
- NotifyCollectionChangedEventArgs.cs
- ContainerFilterService.cs
- IdentityNotMappedException.cs
- HtmlMeta.cs
- ClientProxyGenerator.cs
- ShaderEffect.cs
- DomNameTable.cs
- NamespaceEmitter.cs
- SecondaryViewProvider.cs
- Encoder.cs
- SizeAnimationBase.cs
- SharedStatics.cs
- ActivationService.cs
- NameObjectCollectionBase.cs
- ClaimSet.cs
- BinaryConverter.cs
- CompositionTarget.cs
- XmlSchemaComplexContent.cs
- DataGridCellAutomationPeer.cs
- HostVisual.cs
- XomlSerializationHelpers.cs
- Normalization.cs
- FontWeights.cs
- EntityType.cs
- PlainXmlWriter.cs
- EventWaitHandle.cs
- DocumentGridContextMenu.cs
- StructuredCompositeActivityDesigner.cs
- PersonalizationAdministration.cs
- GeometryConverter.cs
- panel.cs
- PageBreakRecord.cs
- ParallelTimeline.cs
- QueryInterceptorAttribute.cs
- DragAssistanceManager.cs
- SqlBuilder.cs
- TdsRecordBufferSetter.cs
- EpmCustomContentDeSerializer.cs