Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- PropertyMapper.cs
- CatalogZone.cs
- RemotingConfigParser.cs
- COAUTHINFO.cs
- SymbolEqualComparer.cs
- ActivityExecutor.cs
- ProxyWebPartConnectionCollection.cs
- RegistryExceptionHelper.cs
- LinqToSqlWrapper.cs
- DependencyObjectProvider.cs
- Column.cs
- XmlTypeMapping.cs
- ToolStripComboBox.cs
- Drawing.cs
- IntSecurity.cs
- NumberFormatInfo.cs
- CommittableTransaction.cs
- CodeIdentifiers.cs
- NameObjectCollectionBase.cs
- HtmlElementCollection.cs
- FontDriver.cs
- BufferedWebEventProvider.cs
- LoadedOrUnloadedOperation.cs
- MulticastNotSupportedException.cs
- CheckableControlBaseAdapter.cs
- CategoryAttribute.cs
- NumberFunctions.cs
- PreloadedPackages.cs
- SHA512Managed.cs
- FirstMatchCodeGroup.cs
- TemplatePropertyEntry.cs
- KeyToListMap.cs
- SimpleTextLine.cs
- KoreanLunisolarCalendar.cs
- OleDbException.cs
- XsdDateTime.cs
- LogRecordSequence.cs
- OdbcConnectionHandle.cs
- ViewService.cs
- KeyValuePair.cs
- BamlLocalizabilityResolver.cs
- TextEffectResolver.cs
- AssemblyHash.cs
- WebControlAdapter.cs
- FilterEventArgs.cs
- LayoutUtils.cs
- TextViewSelectionProcessor.cs
- EventBindingService.cs
- AttributeUsageAttribute.cs
- XmlDownloadManager.cs
- DocumentCollection.cs
- OleDbStruct.cs
- OutOfMemoryException.cs
- WindowsListViewItem.cs
- HierarchicalDataBoundControl.cs
- OptimalTextSource.cs
- Int16AnimationUsingKeyFrames.cs
- RoutedEventValueSerializer.cs
- SafeHandles.cs
- PhysicalAddress.cs
- Variable.cs
- MLangCodePageEncoding.cs
- CompilerState.cs
- SystemResourceHost.cs
- DrawListViewItemEventArgs.cs
- ValidationError.cs
- SemaphoreSecurity.cs
- CryptoApi.cs
- XmlStringTable.cs
- Soap12ProtocolImporter.cs
- SqlInfoMessageEvent.cs
- InheritedPropertyDescriptor.cs
- Latin1Encoding.cs
- DataGrid.cs
- ScrollChrome.cs
- TextRangeAdaptor.cs
- Facet.cs
- DataTransferEventArgs.cs
- SqlParameterizer.cs
- CacheVirtualItemsEvent.cs
- EntityTypeBase.cs
- ApplicationBuildProvider.cs
- NumberFormatInfo.cs
- CapiHashAlgorithm.cs
- AccessText.cs
- BitmapSourceSafeMILHandle.cs
- ApplicationTrust.cs
- SortFieldComparer.cs
- OrderedDictionaryStateHelper.cs
- IListConverters.cs
- JpegBitmapEncoder.cs
- AnnotationStore.cs
- ObjectTag.cs
- MasterPageBuildProvider.cs
- Image.cs
- DesignerLoader.cs
- FolderLevelBuildProviderCollection.cs
- FixedSOMImage.cs
- DataGridTablesFactory.cs
- HtmlHistory.cs