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
- ResourceDescriptionAttribute.cs
- PropertyGridEditorPart.cs
- TextServicesManager.cs
- ComponentEvent.cs
- Expressions.cs
- CustomAssemblyResolver.cs
- CookielessHelper.cs
- ExternalDataExchangeClient.cs
- DEREncoding.cs
- StrongNameKeyPair.cs
- MetaData.cs
- HtmlHead.cs
- ManagedFilter.cs
- SetStoryboardSpeedRatio.cs
- ObjectDataSourceFilteringEventArgs.cs
- ColumnWidthChangedEvent.cs
- PathSegmentCollection.cs
- WindowsScroll.cs
- cache.cs
- Permission.cs
- DetailsViewAutoFormat.cs
- AnimationTimeline.cs
- DataGridViewIntLinkedList.cs
- FrameworkContentElement.cs
- ArgIterator.cs
- InputLanguageManager.cs
- ExpressionConverter.cs
- ScaleTransform3D.cs
- ValidationEventArgs.cs
- ApplicationSecurityInfo.cs
- EtwTrace.cs
- SurrogateDataContract.cs
- FindProgressChangedEventArgs.cs
- PriorityQueue.cs
- ErrorTolerantObjectWriter.cs
- UserNameSecurityTokenProvider.cs
- InternalCache.cs
- XmlSchemaSimpleTypeList.cs
- WebBrowserSiteBase.cs
- FileIOPermission.cs
- ActivityMetadata.cs
- Manipulation.cs
- TypeListConverter.cs
- RectIndependentAnimationStorage.cs
- ParserOptions.cs
- ImagingCache.cs
- AutomationProperties.cs
- PriorityItem.cs
- InnerItemCollectionView.cs
- NullExtension.cs
- DataSourceControlBuilder.cs
- CodeGen.cs
- WebPartCollection.cs
- TextRangeBase.cs
- ThreadStartException.cs
- SAPIEngineTypes.cs
- SessionStateItemCollection.cs
- SqlConnectionString.cs
- DataSpaceManager.cs
- WebScriptMetadataFormatter.cs
- WebPartCollection.cs
- BuildProviderAppliesToAttribute.cs
- ScrollableControl.cs
- DataPagerField.cs
- XPathAncestorQuery.cs
- HeaderFilter.cs
- PrePrepareMethodAttribute.cs
- ObjectKeyFrameCollection.cs
- UnsafeCollabNativeMethods.cs
- EventLogTraceListener.cs
- FontInfo.cs
- WebSysDefaultValueAttribute.cs
- RemotingService.cs
- FloatUtil.cs
- _ShellExpression.cs
- NoneExcludedImageIndexConverter.cs
- ExeContext.cs
- DependencyPropertyValueSerializer.cs
- BufferedWebEventProvider.cs
- MLangCodePageEncoding.cs
- MDIControlStrip.cs
- Roles.cs
- NonParentingControl.cs
- TypeExtensionSerializer.cs
- SafeProcessHandle.cs
- ApplicationServiceManager.cs
- TracedNativeMethods.cs
- COM2TypeInfoProcessor.cs
- FormsAuthenticationUserCollection.cs
- MetadataCacheItem.cs
- CodeDirectionExpression.cs
- PaginationProgressEventArgs.cs
- oledbmetadatacollectionnames.cs
- DeviceFilterEditorDialog.cs
- DecoderFallback.cs
- ItemCollection.cs
- WebPartConnectVerb.cs
- BitArray.cs
- DataGridViewCellStateChangedEventArgs.cs
- SizeChangedInfo.cs