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
- RegexMatchCollection.cs
- RemotingException.cs
- AnnotationService.cs
- DataContext.cs
- TransportConfigurationTypeElement.cs
- ValueTypeFixupInfo.cs
- AuthenticationSection.cs
- LineGeometry.cs
- SelectionProcessor.cs
- ComponentResourceKeyConverter.cs
- CfgArc.cs
- sqlpipe.cs
- Baml2006KeyRecord.cs
- SoapInteropTypes.cs
- Matrix.cs
- TransactionScopeDesigner.cs
- PersistenceMetadataNamespace.cs
- CustomWebEventKey.cs
- LineProperties.cs
- ClickablePoint.cs
- SystemIcmpV4Statistics.cs
- EventMemberCodeDomSerializer.cs
- SequenceDesigner.xaml.cs
- FontDifferentiator.cs
- HitTestParameters.cs
- ReflectEventDescriptor.cs
- CaseInsensitiveOrdinalStringComparer.cs
- ArraySubsetEnumerator.cs
- RuleElement.cs
- Model3DGroup.cs
- DataObject.cs
- SmtpTransport.cs
- RequestQueryProcessor.cs
- ToolStripPanelSelectionBehavior.cs
- MetadataCollection.cs
- RouteParametersHelper.cs
- TemplateBuilder.cs
- SqlUtil.cs
- XPathNode.cs
- Html32TextWriter.cs
- QilTernary.cs
- WebPartDisplayMode.cs
- FixedBufferAttribute.cs
- CustomCategoryAttribute.cs
- RuleSettings.cs
- ApplyTemplatesAction.cs
- AssemblyResourceLoader.cs
- SystemColorTracker.cs
- EntityDataSourceColumn.cs
- InvalidateEvent.cs
- PrimitiveCodeDomSerializer.cs
- DefaultEventAttribute.cs
- StateFinalizationActivity.cs
- QueryContinueDragEventArgs.cs
- Root.cs
- ZipArchive.cs
- UnregisterInfo.cs
- EntityCommandCompilationException.cs
- TaskFileService.cs
- PointConverter.cs
- OdbcConnectionOpen.cs
- Boolean.cs
- MorphHelper.cs
- FlowPosition.cs
- ToolStripItemCollection.cs
- DelegatingConfigHost.cs
- HwndHostAutomationPeer.cs
- DbParameterCollectionHelper.cs
- X509Certificate2.cs
- TransformerTypeCollection.cs
- ByeOperationCD1AsyncResult.cs
- CounterSetInstance.cs
- ClientConvert.cs
- CheckBoxList.cs
- DelegatingTypeDescriptionProvider.cs
- Wizard.cs
- HintTextConverter.cs
- EncodingNLS.cs
- localization.cs
- Style.cs
- ConstantCheck.cs
- TextTreeRootTextBlock.cs
- DesignerActionItemCollection.cs
- AudioFileOut.cs
- ImageKeyConverter.cs
- FormViewRow.cs
- XamlRtfConverter.cs
- Bold.cs
- KeyValuePairs.cs
- ConversionContext.cs
- _NestedSingleAsyncResult.cs
- ProcessProtocolHandler.cs
- Regex.cs
- WSAddressing10ProblemHeaderQNameFault.cs
- PointHitTestResult.cs
- ConsoleEntryPoint.cs
- cookiecollection.cs
- ValidationRule.cs
- GregorianCalendar.cs
- SkewTransform.cs