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
- OleDbConnection.cs
- IntermediatePolicyValidator.cs
- ItemMap.cs
- QilValidationVisitor.cs
- BooleanAnimationBase.cs
- GestureRecognizer.cs
- ThicknessKeyFrameCollection.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- ApplicationHost.cs
- DelegatingConfigHost.cs
- FrugalMap.cs
- NegationPusher.cs
- PrimitiveDataContract.cs
- _ContextAwareResult.cs
- BitmapMetadataEnumerator.cs
- RemotingSurrogateSelector.cs
- TypeReference.cs
- ChtmlTextWriter.cs
- SqlDataSourceFilteringEventArgs.cs
- ReadContentAsBinaryHelper.cs
- UnionCodeGroup.cs
- AdapterSwitches.cs
- SafeNativeMethods.cs
- DbConnectionHelper.cs
- ProcessModelInfo.cs
- CorrelationManager.cs
- ControllableStoryboardAction.cs
- UserUseLicenseDictionaryLoader.cs
- RuntimeComponentFilter.cs
- SmtpNegotiateAuthenticationModule.cs
- Clause.cs
- KeyboardEventArgs.cs
- ReceiveContext.cs
- AddingNewEventArgs.cs
- ComPlusServiceHost.cs
- InvalidDataException.cs
- IsolatedStorageFile.cs
- WebEvents.cs
- InstallerTypeAttribute.cs
- InternalBufferOverflowException.cs
- SubMenuStyle.cs
- RegisteredHiddenField.cs
- DragDrop.cs
- CLSCompliantAttribute.cs
- PropertyNames.cs
- EventlogProvider.cs
- InvokeProviderWrapper.cs
- BamlLocalizableResourceKey.cs
- MetafileEditor.cs
- TextElementCollection.cs
- UInt32.cs
- ChineseLunisolarCalendar.cs
- MetaModel.cs
- RuntimeConfigLKG.cs
- ImageConverter.cs
- ReaderContextStackData.cs
- DefaultProxySection.cs
- DesignerDataStoredProcedure.cs
- ProvidersHelper.cs
- LexicalChunk.cs
- FontResourceCache.cs
- FakeModelItemImpl.cs
- ProfileSection.cs
- DurationConverter.cs
- ConnectionStringSettings.cs
- InvalidCastException.cs
- EncryptedKey.cs
- ImageListUtils.cs
- ObjectResult.cs
- GeometryDrawing.cs
- SafeBitVector32.cs
- ExpressionConverter.cs
- ColumnMapTranslator.cs
- SingleConverter.cs
- XmlReflectionMember.cs
- HeaderCollection.cs
- FastPropertyAccessor.cs
- SmtpDateTime.cs
- SqlTrackingWorkflowInstance.cs
- ImplicitInputBrush.cs
- XmlSchemaChoice.cs
- JsonQueryStringConverter.cs
- BulletChrome.cs
- WmlSelectionListAdapter.cs
- NavigatingCancelEventArgs.cs
- EditorZoneAutoFormat.cs
- Image.cs
- AccessedThroughPropertyAttribute.cs
- MenuStrip.cs
- ModifierKeysConverter.cs
- UnauthorizedWebPart.cs
- Parameter.cs
- HitTestWithPointDrawingContextWalker.cs
- DocumentGrid.cs
- Latin1Encoding.cs
- Authorization.cs
- ExtendedPropertyDescriptor.cs
- CmsInterop.cs
- XmlTypeMapping.cs
- EnumType.cs