Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / AppModel / NavigationHelper.cs / 1305600 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OleDbPermission.cs
- TheQuery.cs
- XmlSchemaAppInfo.cs
- ToolStripArrowRenderEventArgs.cs
- StrokeNode.cs
- ProtectedUri.cs
- AncestorChangedEventArgs.cs
- OracleRowUpdatedEventArgs.cs
- SqlNotificationEventArgs.cs
- WCFServiceClientProxyGenerator.cs
- RoleGroupCollection.cs
- CompilationRelaxations.cs
- SlipBehavior.cs
- KeyConverter.cs
- RuntimeArgumentHandle.cs
- AnnotationComponentChooser.cs
- SvcMapFileLoader.cs
- SplitterCancelEvent.cs
- StringDictionaryWithComparer.cs
- CounterSample.cs
- KeyEvent.cs
- WebPartEditorCancelVerb.cs
- RsaEndpointIdentity.cs
- Exception.cs
- StylesEditorDialog.cs
- TextSegment.cs
- PrefixQName.cs
- WebBrowserNavigatedEventHandler.cs
- DictionaryEntry.cs
- WebHeaderCollection.cs
- CryptographicAttribute.cs
- ConfigurationManagerInternal.cs
- TypeGenericEnumerableViewSchema.cs
- ExpandSegment.cs
- Variant.cs
- SiteMapNodeItem.cs
- ProviderMetadataCachedInformation.cs
- hwndwrapper.cs
- RecordManager.cs
- StaticExtension.cs
- RowToFieldTransformer.cs
- DesignerActionGlyph.cs
- DbSource.cs
- ForeignKeyConstraint.cs
- WindowsComboBox.cs
- UrlAuthorizationModule.cs
- CoTaskMemHandle.cs
- SymLanguageType.cs
- LicenseProviderAttribute.cs
- NextPreviousPagerField.cs
- Random.cs
- ProcessHostServerConfig.cs
- ListChangedEventArgs.cs
- objectresult_tresulttype.cs
- CategoryEditor.cs
- HyperLinkStyle.cs
- OleDbError.cs
- ValidatorUtils.cs
- Tokenizer.cs
- UpDownEvent.cs
- TypefaceCollection.cs
- TraceSection.cs
- EllipseGeometry.cs
- ToolStripDropDownMenu.cs
- CodeAttributeDeclarationCollection.cs
- FullTextLine.cs
- WebPartZoneBase.cs
- MailBnfHelper.cs
- GlobalProxySelection.cs
- OleAutBinder.cs
- FunctionDescription.cs
- NativeActivityContext.cs
- PropagatorResult.cs
- SqlBinder.cs
- ObjectTokenCategory.cs
- DbConnectionOptions.cs
- WindowsToolbar.cs
- RtType.cs
- InkCanvas.cs
- TextTreeInsertUndoUnit.cs
- IndentTextWriter.cs
- PasswordPropertyTextAttribute.cs
- ScrollBar.cs
- DbConnectionPoolOptions.cs
- WmpBitmapEncoder.cs
- ECDiffieHellman.cs
- HashStream.cs
- EntityParameter.cs
- HttpListenerResponse.cs
- InternalPolicyElement.cs
- InternalCache.cs
- InkCollectionBehavior.cs
- NullRuntimeConfig.cs
- MobileControlsSectionHandler.cs
- Menu.cs
- CryptoKeySecurity.cs
- SymbolType.cs
- HWStack.cs
- CodeAccessPermission.cs
- unsafeIndexingFilterStream.cs