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
- CurrentTimeZone.cs
- ProxySimple.cs
- CircleHotSpot.cs
- Bits.cs
- HtmlControlDesigner.cs
- DLinqDataModelProvider.cs
- ImageField.cs
- RandomNumberGenerator.cs
- DbException.cs
- HtmlControl.cs
- TileBrush.cs
- TransformCryptoHandle.cs
- KnownBoxes.cs
- ExpanderAutomationPeer.cs
- httpapplicationstate.cs
- RadioButtonRenderer.cs
- NullRuntimeConfig.cs
- HtmlInputReset.cs
- OdbcConnectionFactory.cs
- ReferenceConverter.cs
- SystemColors.cs
- StringUtil.cs
- FeatureSupport.cs
- IgnoreFlushAndCloseStream.cs
- HttpModuleActionCollection.cs
- DSASignatureFormatter.cs
- RectangleGeometry.cs
- FloaterBaseParagraph.cs
- SharedMemory.cs
- base64Transforms.cs
- ListViewTableRow.cs
- HealthMonitoringSectionHelper.cs
- FamilyCollection.cs
- ProgramNode.cs
- SplineKeyFrames.cs
- WebBaseEventKeyComparer.cs
- BufferedStream.cs
- DataPagerFieldCollection.cs
- EnumerableRowCollection.cs
- XmlValidatingReaderImpl.cs
- Converter.cs
- XPathConvert.cs
- XXXInfos.cs
- ParameterDataSourceExpression.cs
- SectionXmlInfo.cs
- ToolboxComponentsCreatingEventArgs.cs
- XXXOnTypeBuilderInstantiation.cs
- FormViewPageEventArgs.cs
- MetafileHeader.cs
- ChainedAsyncResult.cs
- PrincipalPermission.cs
- SqlLiftWhereClauses.cs
- ZoneButton.cs
- HtmlForm.cs
- BaseServiceProvider.cs
- CodeDomLoader.cs
- TypeCodeDomSerializer.cs
- OperationCanceledException.cs
- ScriptMethodAttribute.cs
- DispatchWrapper.cs
- InheritedPropertyDescriptor.cs
- SymbolTable.cs
- ExtendedPropertyInfo.cs
- OracleCommandSet.cs
- FolderBrowserDialog.cs
- ListMarkerLine.cs
- CalendarDesigner.cs
- RegexCaptureCollection.cs
- WebPartEventArgs.cs
- OneOfScalarConst.cs
- CodeTypeConstructor.cs
- XamlTreeBuilderBamlRecordWriter.cs
- ParserStack.cs
- Operand.cs
- DbProviderFactoriesConfigurationHandler.cs
- EntityViewContainer.cs
- EFAssociationProvider.cs
- HttpConfigurationSystem.cs
- CodeAccessSecurityEngine.cs
- SourceItem.cs
- RadioButtonPopupAdapter.cs
- WebPartTransformer.cs
- KoreanLunisolarCalendar.cs
- UnsafeNativeMethods.cs
- BitConverter.cs
- XmlRootAttribute.cs
- SecurityPolicySection.cs
- ProfileManager.cs
- ClientSettingsStore.cs
- UrlMappingCollection.cs
- TemplatePropertyEntry.cs
- CalendarAutomationPeer.cs
- FixedNode.cs
- RequestCacheValidator.cs
- CriticalFinalizerObject.cs
- MenuAdapter.cs
- OleDbWrapper.cs
- IdentityNotMappedException.cs
- ErrorTableItemStyle.cs
- WebPartDisplayMode.cs