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
- FlowDecisionLabelFeature.cs
- _LazyAsyncResult.cs
- SerializerDescriptor.cs
- Pens.cs
- VariableQuery.cs
- DataSourceConverter.cs
- EncryptedPackage.cs
- WpfWebRequestHelper.cs
- Substitution.cs
- URL.cs
- InvalidProgramException.cs
- RegexCharClass.cs
- DesignerSerializerAttribute.cs
- ToolBarPanel.cs
- ParameterDataSourceExpression.cs
- PreDigestedSignedInfo.cs
- WindowsToolbar.cs
- XmlValueConverter.cs
- DataGridViewCellValueEventArgs.cs
- TrackPoint.cs
- WorkflowInstance.cs
- ScriptDescriptor.cs
- SingleTagSectionHandler.cs
- SelectionPattern.cs
- DataStreamFromComStream.cs
- GenericXmlSecurityToken.cs
- PauseStoryboard.cs
- WindowsListViewSubItem.cs
- Missing.cs
- Hyperlink.cs
- PlanCompiler.cs
- Application.cs
- AddressUtility.cs
- DataGridHyperlinkColumn.cs
- GridViewUpdatedEventArgs.cs
- DbDataReader.cs
- Color.cs
- EditorZone.cs
- CryptoConfig.cs
- TransportContext.cs
- QuadraticBezierSegment.cs
- WebPartConnectionsDisconnectVerb.cs
- XmlCharCheckingWriter.cs
- EventProviderClassic.cs
- HostingPreferredMapPath.cs
- AppDomain.cs
- CodeTypeDeclaration.cs
- TreeBuilder.cs
- MetadataCollection.cs
- bidPrivateBase.cs
- MarshalByValueComponent.cs
- ClientApiGenerator.cs
- DetailsView.cs
- DataControlLinkButton.cs
- Form.cs
- DesignerCategoryAttribute.cs
- ErrorEventArgs.cs
- RectangleGeometry.cs
- OdbcReferenceCollection.cs
- ResourceWriter.cs
- GroupStyle.cs
- AbstractExpressions.cs
- GradientBrush.cs
- UnionQueryOperator.cs
- WebPartTracker.cs
- TagMapCollection.cs
- DotAtomReader.cs
- AssociationTypeEmitter.cs
- PropertyIdentifier.cs
- DataErrorValidationRule.cs
- EntityContainerAssociationSet.cs
- GridViewSortEventArgs.cs
- SqlBinder.cs
- ServiceModelActivationSectionGroup.cs
- COAUTHINFO.cs
- WebPartDisplayModeEventArgs.cs
- ConfigurationLockCollection.cs
- CLSCompliantAttribute.cs
- WebPartZoneCollection.cs
- ColumnResizeUndoUnit.cs
- PassportAuthenticationModule.cs
- IpcServerChannel.cs
- RuntimeIdentifierPropertyAttribute.cs
- DataBindingList.cs
- SoapUnknownHeader.cs
- UnsafeNativeMethods.cs
- CodeGeneratorOptions.cs
- KnownBoxes.cs
- EventLevel.cs
- PLINQETWProvider.cs
- FastPropertyAccessor.cs
- SchemeSettingElementCollection.cs
- GeneralTransform.cs
- KeyValuePair.cs
- SystemInfo.cs
- Pair.cs
- EntityCommand.cs
- ImageBrush.cs
- XmlnsDefinitionAttribute.cs
- Token.cs