Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / MS / Internal / AppModel / NavigationHelper.cs / 1 / NavigationHelper.cs
using System;
using System.Windows;
using System.Windows.Navigation;
using System.Windows.Controls;
using System.Windows.Automation;
using System.Windows.Media;
using System.Globalization;
using System.Diagnostics;
using MS.Internal;
namespace MS.Internal.AppModel
{
internal static class NavigationHelper
{
///
/// See INavigatorImpl.FindRootViewer().
///
internal static Visual FindRootViewer(ContentControl navigator, string contentPresenterName)
{
object content = navigator.Content;
if (content == null || content is Visual)
return content as Visual;
ContentPresenter cp = null;
if (navigator.Template != null)
{
cp = (ContentPresenter)navigator.Template.FindName(contentPresenterName, navigator);
}
// If null, either is not defined in the current template or the template
// has not been applied yet.
if (cp == null || cp.InternalVisualChildrenCount == 0/*Layout not done yet*/)
return null;
Visual v = cp.InternalGetVisualChild(0);
return v;
}
};
}
// 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
- PrintPageEvent.cs
- MobileResource.cs
- TextPointer.cs
- TcpConnectionPoolSettingsElement.cs
- AspCompat.cs
- SqlTypeSystemProvider.cs
- GacUtil.cs
- SchemaMapping.cs
- ZoneMembershipCondition.cs
- Vector3DKeyFrameCollection.cs
- NonBatchDirectoryCompiler.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- Parameter.cs
- DnsPermission.cs
- TraceData.cs
- TextEditorCharacters.cs
- DataServiceException.cs
- CryptoKeySecurity.cs
- RemotingConfiguration.cs
- hresults.cs
- ReachVisualSerializer.cs
- ContextStaticAttribute.cs
- TabPageDesigner.cs
- DataGridClipboardCellContent.cs
- PerspectiveCamera.cs
- SoapHelper.cs
- RadioButton.cs
- StateMachine.cs
- GrowingArray.cs
- EventSinkActivity.cs
- EndPoint.cs
- WindowsFormsLinkLabel.cs
- XmlBoundElement.cs
- PeerObject.cs
- BamlReader.cs
- SecurityDocument.cs
- Convert.cs
- ResolveDuplexAsyncResult.cs
- FormViewPagerRow.cs
- SignatureConfirmations.cs
- ExpressionDumper.cs
- ManagementInstaller.cs
- NotSupportedException.cs
- LicFileLicenseProvider.cs
- SHA1Managed.cs
- DecimalAnimation.cs
- DocumentXPathNavigator.cs
- Enum.cs
- RankException.cs
- Win32KeyboardDevice.cs
- HighlightVisual.cs
- ColumnMapVisitor.cs
- UriScheme.cs
- LinkUtilities.cs
- HttpHandlerAction.cs
- HttpModuleCollection.cs
- DataKeyArray.cs
- SharedDp.cs
- AssemblyFilter.cs
- Avt.cs
- SolidBrush.cs
- figurelength.cs
- Publisher.cs
- UnknownBitmapEncoder.cs
- Token.cs
- InplaceBitmapMetadataWriter.cs
- MobileCategoryAttribute.cs
- RecognizedPhrase.cs
- LingerOption.cs
- DropShadowBitmapEffect.cs
- ObservableDictionary.cs
- _NetworkingPerfCounters.cs
- CompilerGeneratedAttribute.cs
- OperandQuery.cs
- Point3DAnimationBase.cs
- MenuAutomationPeer.cs
- PrintController.cs
- TextServicesContext.cs
- Binding.cs
- ColumnMapVisitor.cs
- EncodedStreamFactory.cs
- SecurityDescriptor.cs
- EllipseGeometry.cs
- SystemNetworkInterface.cs
- MasterPageBuildProvider.cs
- HtmlEmptyTagControlBuilder.cs
- PointLightBase.cs
- XPathNodePointer.cs
- Types.cs
- HttpModuleCollection.cs
- SplashScreen.cs
- InfoCardUIAgent.cs
- XmlSerializationGeneratedCode.cs
- PrimitiveXmlSerializers.cs
- StackSpiller.Generated.cs
- SecurityIdentifierConverter.cs
- BoundPropertyEntry.cs
- SkinBuilder.cs
- WebBrowserNavigatingEventHandler.cs
- XmlnsCompatibleWithAttribute.cs