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
- RenderDataDrawingContext.cs
- ResizingMessageFilter.cs
- UnauthorizedWebPart.cs
- WebBrowser.cs
- SignedInfo.cs
- SecurityPermission.cs
- UInt16Storage.cs
- DetailsViewInsertEventArgs.cs
- TransformBlockRequest.cs
- StoreConnection.cs
- SerializerDescriptor.cs
- AbstractSvcMapFileLoader.cs
- QueryServiceConfigHandle.cs
- BoolExpressionVisitors.cs
- JsonEncodingStreamWrapper.cs
- ThemeInfoAttribute.cs
- PreviewKeyDownEventArgs.cs
- MetabaseServerConfig.cs
- OneWayBindingElementImporter.cs
- DESCryptoServiceProvider.cs
- GradientSpreadMethodValidation.cs
- TreeViewItemAutomationPeer.cs
- LoadGrammarCompletedEventArgs.cs
- XamlPoint3DCollectionSerializer.cs
- FunctionCommandText.cs
- BatchParser.cs
- UpdateRecord.cs
- InputQueue.cs
- HuffModule.cs
- XDRSchema.cs
- InterleavedZipPartStream.cs
- AnimatedTypeHelpers.cs
- SafeRightsManagementHandle.cs
- TextEmbeddedObject.cs
- MembershipValidatePasswordEventArgs.cs
- VisualCollection.cs
- ObjectStateEntry.cs
- NotifyCollectionChangedEventArgs.cs
- DispatcherProcessingDisabled.cs
- GuidTagList.cs
- ReflectEventDescriptor.cs
- HostedBindingBehavior.cs
- CodeCompileUnit.cs
- MemoryMappedViewAccessor.cs
- HttpsTransportBindingElement.cs
- Comparer.cs
- Rotation3D.cs
- ConfigurationManagerInternalFactory.cs
- RecognitionEventArgs.cs
- DataGridViewToolTip.cs
- AlgoModule.cs
- BuildManager.cs
- ToolStripArrowRenderEventArgs.cs
- Pair.cs
- SafeTimerHandle.cs
- InternalBase.cs
- XmlSchemaAnyAttribute.cs
- recordstatefactory.cs
- RootBrowserWindowAutomationPeer.cs
- HotSpotCollectionEditor.cs
- VisualTreeUtils.cs
- MsmqProcessProtocolHandler.cs
- BufferAllocator.cs
- AuthenticationConfig.cs
- CleanUpVirtualizedItemEventArgs.cs
- ServiceModelActivationSectionGroup.cs
- BamlRecordReader.cs
- CreateParams.cs
- WebUtil.cs
- IndexerNameAttribute.cs
- DispatcherHooks.cs
- CompilationUnit.cs
- BamlResourceContent.cs
- ObjRef.cs
- TemplateLookupAction.cs
- ConnectionsZone.cs
- CapabilitiesState.cs
- ToolBarPanel.cs
- IconHelper.cs
- MetadataSource.cs
- PackageStore.cs
- BaseParser.cs
- UpdateTracker.cs
- ThemeDictionaryExtension.cs
- Accessors.cs
- JpegBitmapDecoder.cs
- TextTreeUndo.cs
- X509Extension.cs
- RowToFieldTransformer.cs
- TranslateTransform.cs
- DbDeleteCommandTree.cs
- SchemaTableColumn.cs
- CommandField.cs
- CacheHelper.cs
- EntityDataSourceColumn.cs
- GetParentChain.cs
- ChangePasswordDesigner.cs
- RenderCapability.cs
- PerformanceCounterPermission.cs
- X509CertificateClaimSet.cs