Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- RuntimeConfig.cs
- UndoManager.cs
- SiteMapHierarchicalDataSourceView.cs
- ButtonChrome.cs
- InstanceOwnerQueryResult.cs
- RuleSettingsCollection.cs
- ProvidersHelper.cs
- TemplateColumn.cs
- X509Certificate2.cs
- ComboBoxAutomationPeer.cs
- TakeQueryOptionExpression.cs
- CodeTypeMember.cs
- PathFigure.cs
- StorageConditionPropertyMapping.cs
- TypeUtil.cs
- MonthChangedEventArgs.cs
- MimeBasePart.cs
- LocalFileSettingsProvider.cs
- Transform.cs
- ColumnClickEvent.cs
- DbException.cs
- SmiXetterAccessMap.cs
- Win32SafeHandles.cs
- InternalsVisibleToAttribute.cs
- RegistrySecurity.cs
- FrameworkContentElementAutomationPeer.cs
- TargetException.cs
- KerberosSecurityTokenAuthenticator.cs
- SqlUDTStorage.cs
- XmlSerializerVersionAttribute.cs
- NavigatorInput.cs
- ChannelRequirements.cs
- BooleanAnimationUsingKeyFrames.cs
- GeneralTransform2DTo3D.cs
- EntityClientCacheKey.cs
- ChameleonKey.cs
- AsymmetricKeyExchangeFormatter.cs
- DynamicRendererThreadManager.cs
- MemberPath.cs
- ReplyChannelBinder.cs
- StringSorter.cs
- peernodeimplementation.cs
- TranslateTransform.cs
- ListView.cs
- XmlnsDictionary.cs
- ContextMenuStrip.cs
- RoutedEventConverter.cs
- AmbientLight.cs
- CodeNamespace.cs
- HyperLinkField.cs
- DataAccessException.cs
- XamlDesignerSerializationManager.cs
- ExtensionQuery.cs
- HopperCache.cs
- DESCryptoServiceProvider.cs
- XmlSchemaChoice.cs
- WMIGenerator.cs
- StrongNameKeyPair.cs
- Validator.cs
- FlowDocumentReaderAutomationPeer.cs
- AutomationPeer.cs
- DataStorage.cs
- ToolBarButtonClickEvent.cs
- HostingEnvironmentSection.cs
- SerializationInfo.cs
- SqlTransaction.cs
- FontStretch.cs
- CompilerGlobalScopeAttribute.cs
- BinaryReader.cs
- XmlEntity.cs
- ClientUriBehavior.cs
- SqlResolver.cs
- HttpListenerRequest.cs
- DataBoundControl.cs
- Stylesheet.cs
- DateTimeConstantAttribute.cs
- PolyLineSegment.cs
- InvokeHandlers.cs
- XmlAtomicValue.cs
- ExecutionContext.cs
- SafeBitVector32.cs
- ByteStreamMessageUtility.cs
- Propagator.JoinPropagator.cs
- RequestSecurityTokenResponseCollection.cs
- ToolStripItemImageRenderEventArgs.cs
- GridItemPatternIdentifiers.cs
- ComplusTypeValidator.cs
- SerializationSectionGroup.cs
- PreloadHost.cs
- BrowserCapabilitiesFactory.cs
- SelectionProcessor.cs
- WebPartVerb.cs
- SmtpNegotiateAuthenticationModule.cs
- CompletionCallbackWrapper.cs
- FixedSOMFixedBlock.cs
- UnSafeCharBuffer.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- _NetRes.cs
- ToolStripContentPanel.cs
- SingleAnimationBase.cs