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
- DefaultSerializationProviderAttribute.cs
- SqlConnectionManager.cs
- DisplayMemberTemplateSelector.cs
- DataSourceGeneratorException.cs
- ButtonRenderer.cs
- PrinterUnitConvert.cs
- TagPrefixAttribute.cs
- XmlFormatExtensionPrefixAttribute.cs
- DirectionalLight.cs
- StylesEditorDialog.cs
- IDataContractSurrogate.cs
- SolidBrush.cs
- PropertiesTab.cs
- RegionIterator.cs
- FixedSOMGroup.cs
- CompositeDuplexElement.cs
- CmsUtils.cs
- ExecutionEngineException.cs
- EventPropertyMap.cs
- Lease.cs
- XmlMemberMapping.cs
- nulltextnavigator.cs
- DataColumnCollection.cs
- DataGridViewCellStyleChangedEventArgs.cs
- CultureTableRecord.cs
- CodeAccessPermission.cs
- CloudCollection.cs
- ContourSegment.cs
- XmlReader.cs
- WebPartManager.cs
- CodeDesigner.cs
- DynamicFilter.cs
- MetadataPropertyvalue.cs
- Vector3dCollection.cs
- ConfigurationPropertyAttribute.cs
- RotationValidation.cs
- XmlSchemaAnnotation.cs
- DataGridTablesFactory.cs
- UIHelper.cs
- OracleLob.cs
- FixedBufferAttribute.cs
- TimeEnumHelper.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- SQLStringStorage.cs
- AxDesigner.cs
- LeaseManager.cs
- BinaryUtilClasses.cs
- FrameworkTextComposition.cs
- QuinticEase.cs
- Vector3D.cs
- PrivilegeNotHeldException.cs
- FtpRequestCacheValidator.cs
- ISessionStateStore.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- Token.cs
- ExecutionContext.cs
- CollectionBase.cs
- COMException.cs
- SiteMembershipCondition.cs
- CacheVirtualItemsEvent.cs
- StrokeSerializer.cs
- UserInitiatedNavigationPermission.cs
- UnsafeNativeMethodsTablet.cs
- VariableReference.cs
- RNGCryptoServiceProvider.cs
- ExpressionParser.cs
- ListArgumentProvider.cs
- XmlSequenceWriter.cs
- EDesignUtil.cs
- FormCollection.cs
- PerfCounterSection.cs
- FieldMetadata.cs
- XmlSchemaGroup.cs
- LocalizationComments.cs
- ContextMenu.cs
- ProxyGenerationError.cs
- IItemContainerGenerator.cs
- WebPartCloseVerb.cs
- PageRequestManager.cs
- ObjectContext.cs
- NumberFormatInfo.cs
- BaseResourcesBuildProvider.cs
- StringPropertyBuilder.cs
- PerformanceCounterNameAttribute.cs
- ApplicationDirectory.cs
- DynamicVirtualDiscoSearcher.cs
- HttpHeaderCollection.cs
- DeclaredTypeElementCollection.cs
- CompiledQuery.cs
- MarkupExtensionParser.cs
- ServicePoint.cs
- StandardToolWindows.cs
- OutputCacheProfileCollection.cs
- DialogResultConverter.cs
- TypedReference.cs
- SqlClientWrapperSmiStreamChars.cs
- ComponentEditorPage.cs
- ConfigXmlCDataSection.cs
- CompoundFileReference.cs
- Stack.cs