Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- EntityKeyElement.cs
- MethodToken.cs
- HttpWriter.cs
- ContentTextAutomationPeer.cs
- CodeAccessSecurityEngine.cs
- WindowsAuthenticationModule.cs
- Lazy.cs
- CustomWebEventKey.cs
- SecurityDescriptor.cs
- AlternateView.cs
- FixedTextPointer.cs
- TextEditorSelection.cs
- HealthMonitoringSection.cs
- SoapIncludeAttribute.cs
- HwndProxyElementProvider.cs
- ScrollItemProviderWrapper.cs
- AlternateView.cs
- FormClosedEvent.cs
- ExpressionNode.cs
- TraceProvider.cs
- HMACSHA256.cs
- XsltArgumentList.cs
- PackagingUtilities.cs
- DynamicQueryableWrapper.cs
- XmlNodeChangedEventManager.cs
- ConfigXmlElement.cs
- DriveInfo.cs
- ServiceContractListItemList.cs
- SupportingTokenAuthenticatorSpecification.cs
- Preprocessor.cs
- EntityFrameworkVersions.cs
- PropertyChangeTracker.cs
- DecoderNLS.cs
- RedistVersionInfo.cs
- CaseStatement.cs
- ConditionalAttribute.cs
- sqlnorm.cs
- TextDecorationCollection.cs
- SmtpNetworkElement.cs
- ExtensibleSyndicationObject.cs
- ProcessRequestArgs.cs
- CodeNamespaceImport.cs
- Monitor.cs
- EpmSyndicationContentDeSerializer.cs
- NotCondition.cs
- DesignerSerializerAttribute.cs
- HttpInputStream.cs
- Pair.cs
- DataServiceQuery.cs
- MasterPageParser.cs
- RectIndependentAnimationStorage.cs
- ActionMessageFilter.cs
- XPathMultyIterator.cs
- DNS.cs
- RtfControls.cs
- ListViewItem.cs
- MobileCategoryAttribute.cs
- Clipboard.cs
- ToolStripRenderer.cs
- HttpCacheVaryByContentEncodings.cs
- OdbcConnectionFactory.cs
- ISCIIEncoding.cs
- DetailsViewAutoFormat.cs
- ToolStripProgressBar.cs
- EntityStoreSchemaFilterEntry.cs
- ActivityInstanceMap.cs
- XPathNodeInfoAtom.cs
- DataTemplate.cs
- MailMessage.cs
- WindowsBrush.cs
- OleAutBinder.cs
- IconHelper.cs
- SqlBooleanMismatchVisitor.cs
- DoubleStorage.cs
- AdapterDictionary.cs
- ZipQueryOperator.cs
- LayoutDump.cs
- RangeValidator.cs
- SqlBulkCopy.cs
- RegexRunnerFactory.cs
- _FixedSizeReader.cs
- PageContentAsyncResult.cs
- PageContentAsyncResult.cs
- SQLInt16.cs
- CharAnimationUsingKeyFrames.cs
- InfiniteIntConverter.cs
- XmlRawWriterWrapper.cs
- XPathAncestorIterator.cs
- OpCellTreeNode.cs
- InitializationEventAttribute.cs
- TemplateBamlTreeBuilder.cs
- ListParagraph.cs
- Win32MouseDevice.cs
- BinHexDecoder.cs
- XmlMtomWriter.cs
- GifBitmapEncoder.cs
- MatrixAnimationBase.cs
- Identifier.cs
- _SslStream.cs
- AccessKeyManager.cs