Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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; // 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 List GetChildrenCore()
{
// 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
- ByteKeyFrameCollection.cs
- DeferredElementTreeState.cs
- DiscoveryDocumentLinksPattern.cs
- ReferencedCollectionType.cs
- ComplexTypeEmitter.cs
- StreamUpdate.cs
- EventSource.cs
- UnsafeNativeMethods.cs
- Message.cs
- CommandDevice.cs
- _WinHttpWebProxyDataBuilder.cs
- WebPartDisplayModeCollection.cs
- TaiwanCalendar.cs
- TreeBuilder.cs
- Viewport3DVisual.cs
- ISAPIRuntime.cs
- UpdateTracker.cs
- TransformerInfo.cs
- ToolboxDataAttribute.cs
- Memoizer.cs
- TrackPointCollection.cs
- HttpCachePolicyElement.cs
- CodeNamespaceCollection.cs
- PersonalizablePropertyEntry.cs
- ToolTip.cs
- MailBnfHelper.cs
- ResXBuildProvider.cs
- SettingsPropertyCollection.cs
- ipaddressinformationcollection.cs
- configsystem.cs
- TableRowCollection.cs
- NativeActivityFaultContext.cs
- DelegatedStream.cs
- SelectManyQueryOperator.cs
- EventNotify.cs
- CodeValidator.cs
- FieldBuilder.cs
- PopupRootAutomationPeer.cs
- KoreanLunisolarCalendar.cs
- EdmError.cs
- SoapInteropTypes.cs
- XmlDownloadManager.cs
- ProfilePropertySettings.cs
- HttpWebRequest.cs
- RegexRunnerFactory.cs
- _Win32.cs
- mda.cs
- DefaultEventAttribute.cs
- SingleStorage.cs
- XpsS0ValidatingLoader.cs
- JpegBitmapDecoder.cs
- DataGridViewAddColumnDialog.cs
- ErrorHandlingReceiver.cs
- BaseCollection.cs
- MarshalByValueComponent.cs
- ResourceReader.cs
- PasswordRecovery.cs
- ExpanderAutomationPeer.cs
- HostingEnvironmentException.cs
- Stroke2.cs
- ColorConverter.cs
- TdsParser.cs
- HostingEnvironment.cs
- PowerStatus.cs
- InvalidFilterCriteriaException.cs
- Geometry.cs
- ConnectionsZone.cs
- DBDataPermissionAttribute.cs
- XamlPathDataSerializer.cs
- DataSetSchema.cs
- ProxyAssemblyNotLoadedException.cs
- DataGridTablesFactory.cs
- StringWriter.cs
- BitmapEffectInputData.cs
- PrePostDescendentsWalker.cs
- HttpRequest.cs
- HostingEnvironmentException.cs
- OciEnlistContext.cs
- RegistryExceptionHelper.cs
- DataServiceResponse.cs
- ClientBuildManagerCallback.cs
- DefaultExpressionVisitor.cs
- SchemaSetCompiler.cs
- CodeCatchClauseCollection.cs
- RequestResizeEvent.cs
- WorkflowServiceHostFactory.cs
- FloaterBaseParagraph.cs
- ObjRef.cs
- DocumentSchemaValidator.cs
- ModelVisual3D.cs
- XamlReader.cs
- StrongNameKeyPair.cs
- SqlTransaction.cs
- ListViewInsertEventArgs.cs
- TypeUnloadedException.cs
- GetReadStreamResult.cs
- OdbcConnectionPoolProviderInfo.cs
- DebugHandleTracker.cs
- DataTableMappingCollection.cs
- AdapterDictionary.cs