Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / 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, eitheris 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. 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, eitheris 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
- EntityDataSourceContextCreatedEventArgs.cs
- TCEAdapterGenerator.cs
- TypeBuilderInstantiation.cs
- EncryptedPackage.cs
- DefaultDiscoveryServiceExtension.cs
- PerformanceCounterNameAttribute.cs
- DynamicObject.cs
- TypeConstant.cs
- MD5CryptoServiceProvider.cs
- CodeExpressionStatement.cs
- FileLevelControlBuilderAttribute.cs
- FixedSOMSemanticBox.cs
- WindowsComboBox.cs
- ImageListDesigner.cs
- DataGridViewCellConverter.cs
- RegexMatchCollection.cs
- InstanceOwnerQueryResult.cs
- ActivityTypeDesigner.xaml.cs
- WebPartHelpVerb.cs
- StreamReader.cs
- InvalidAsynchronousStateException.cs
- ReaderWriterLock.cs
- FormViewInsertEventArgs.cs
- DesignerCategoryAttribute.cs
- TextLine.cs
- UIntPtr.cs
- DocumentOrderComparer.cs
- PreservationFileWriter.cs
- PaintEvent.cs
- SqlProviderManifest.cs
- CatalogZone.cs
- DataGridViewColumn.cs
- ParsedAttributeCollection.cs
- ScrollViewerAutomationPeer.cs
- StrongNameKeyPair.cs
- ContextMenuStripGroup.cs
- DelegatingTypeDescriptionProvider.cs
- MouseWheelEventArgs.cs
- CodeLabeledStatement.cs
- SqlBuffer.cs
- XmlSerializableServices.cs
- SourceSwitch.cs
- MetaTable.cs
- WindowsTooltip.cs
- InstanceDataCollectionCollection.cs
- SimpleMailWebEventProvider.cs
- _SslState.cs
- DocumentAutomationPeer.cs
- SecurityRuntime.cs
- ChangesetResponse.cs
- TabPage.cs
- COAUTHINFO.cs
- OutputScopeManager.cs
- MemberInitExpression.cs
- DataRecordInfo.cs
- FeatureSupport.cs
- TypeLoadException.cs
- BuildProvider.cs
- BaseTemplateBuildProvider.cs
- TileBrush.cs
- COM2Enum.cs
- AspCompat.cs
- WebResourceUtil.cs
- VisualCollection.cs
- IProducerConsumerCollection.cs
- ComponentChangingEvent.cs
- ConstructorArgumentAttribute.cs
- PageAdapter.cs
- Site.cs
- SpellerInterop.cs
- WindowsStreamSecurityBindingElement.cs
- TypeForwardedToAttribute.cs
- DbExpressionRules.cs
- LinearGradientBrush.cs
- CorrelationService.cs
- DataBindEngine.cs
- TracedNativeMethods.cs
- ToolStripDropTargetManager.cs
- OutputScopeManager.cs
- Timer.cs
- ResXResourceReader.cs
- Binding.cs
- WindowInteractionStateTracker.cs
- DecryptedHeader.cs
- Activator.cs
- UpdateException.cs
- ApplicationSecurityManager.cs
- ZipArchive.cs
- EmptyElement.cs
- TextControlDesigner.cs
- RadialGradientBrush.cs
- _ListenerResponseStream.cs
- AnnotationDocumentPaginator.cs
- UnsafeNativeMethods.cs
- _UriTypeConverter.cs
- ProviderException.cs
- SessionStateContainer.cs
- DesignerDataStoredProcedure.cs
- ListSourceHelper.cs
- WeakHashtable.cs