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
- MinMaxParagraphWidth.cs
- MimeFormatExtensions.cs
- ConfigXmlComment.cs
- ColorDialog.cs
- CmsUtils.cs
- TextBoxView.cs
- OdbcInfoMessageEvent.cs
- uribuilder.cs
- CharStorage.cs
- CodeDOMUtility.cs
- WeakReference.cs
- SecurityPolicySection.cs
- AsyncResult.cs
- InputManager.cs
- EntitySetBase.cs
- IRCollection.cs
- BamlLocalizabilityResolver.cs
- ContentTextAutomationPeer.cs
- XmlHierarchicalEnumerable.cs
- CodeTryCatchFinallyStatement.cs
- FileLoadException.cs
- CssStyleCollection.cs
- Quad.cs
- Matrix3D.cs
- TaskFormBase.cs
- ObfuscateAssemblyAttribute.cs
- FixedBufferAttribute.cs
- AuthenticatingEventArgs.cs
- SafeEventLogReadHandle.cs
- AuthenticatedStream.cs
- ReliableChannelListener.cs
- SecurityProtocol.cs
- NativeMethods.cs
- ReverseComparer.cs
- AlphabeticalEnumConverter.cs
- CalendarDay.cs
- ArraySubsetEnumerator.cs
- DelegateBodyWriter.cs
- OutOfMemoryException.cs
- ToggleButton.cs
- StringHelper.cs
- XPathAxisIterator.cs
- Stroke2.cs
- XPathMessageContext.cs
- DesignerVerb.cs
- RelationshipFixer.cs
- FacetChecker.cs
- SystemSounds.cs
- filewebrequest.cs
- AssociationTypeEmitter.cs
- KeyboardNavigation.cs
- GridViewSortEventArgs.cs
- LoginNameDesigner.cs
- UnsafeNativeMethods.cs
- ToolStripItem.cs
- ComboBoxItem.cs
- WarningException.cs
- SamlSecurityToken.cs
- XPathNavigator.cs
- TreeNodeBinding.cs
- SmtpAuthenticationManager.cs
- DataReaderContainer.cs
- MexHttpBindingCollectionElement.cs
- UnmanagedMemoryStream.cs
- Attributes.cs
- GridViewHeaderRowPresenter.cs
- PageFunction.cs
- DataSysAttribute.cs
- SequenceDesignerAccessibleObject.cs
- SoapProtocolReflector.cs
- KeysConverter.cs
- StorageMappingItemCollection.cs
- DummyDataSource.cs
- NavigationProgressEventArgs.cs
- SimpleType.cs
- ThousandthOfEmRealDoubles.cs
- SecureEnvironment.cs
- ResourceCategoryAttribute.cs
- KeySpline.cs
- FileDataSource.cs
- BitmapEffectState.cs
- RijndaelCryptoServiceProvider.cs
- WSSecurityOneDotOneReceiveSecurityHeader.cs
- SafeArrayRankMismatchException.cs
- LogLogRecord.cs
- ExpressionBuilderContext.cs
- XsdBuildProvider.cs
- GeneralTransform3DTo2DTo3D.cs
- COAUTHINFO.cs
- XPathChildIterator.cs
- ReferencedCollectionType.cs
- DefaultDiscoveryService.cs
- XamlVector3DCollectionSerializer.cs
- BinaryObjectWriter.cs
- CodeTypeDeclaration.cs
- DataGridParentRows.cs
- ToolZone.cs
- XomlCompilerResults.cs
- OracleTimeSpan.cs
- Evaluator.cs