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
- DynamicFilterExpression.cs
- TraceHandler.cs
- FrameworkElementFactory.cs
- MessageSecurityTokenVersion.cs
- XmlNavigatorFilter.cs
- FacetChecker.cs
- Transform3DGroup.cs
- SocketPermission.cs
- RepeaterDataBoundAdapter.cs
- UnsafeNetInfoNativeMethods.cs
- DynamicDataManager.cs
- LinqDataSourceDisposeEventArgs.cs
- MobileResource.cs
- GreenMethods.cs
- IndexOutOfRangeException.cs
- ActiveXContainer.cs
- PeerEndPoint.cs
- COM2AboutBoxPropertyDescriptor.cs
- HostedHttpRequestAsyncResult.cs
- ProxyAttribute.cs
- UnsafeNativeMethods.cs
- EventManager.cs
- InplaceBitmapMetadataWriter.cs
- ZoomPercentageConverter.cs
- TriggerActionCollection.cs
- DbProviderServices.cs
- XsltLoader.cs
- SystemTcpStatistics.cs
- TrailingSpaceComparer.cs
- CalendarDay.cs
- TextEvent.cs
- DefaultObjectMappingItemCollection.cs
- UrlAuthorizationModule.cs
- LayoutEvent.cs
- TableParaClient.cs
- OrderByExpression.cs
- RelatedCurrencyManager.cs
- AttributedMetaModel.cs
- SkinBuilder.cs
- XmlDataLoader.cs
- BitmapEffectrendercontext.cs
- HelpFileFileNameEditor.cs
- DayRenderEvent.cs
- AttributeCollection.cs
- BitmapEffectGeneralTransform.cs
- SQLDouble.cs
- RectAnimationClockResource.cs
- CompositeCollectionView.cs
- SchemaCollectionPreprocessor.cs
- SendingRequestEventArgs.cs
- Itemizer.cs
- TagNameToTypeMapper.cs
- IsolatedStorageSecurityState.cs
- GeometryGroup.cs
- PeerTransportSecuritySettings.cs
- CriticalHandle.cs
- PointAnimationBase.cs
- WeakReference.cs
- Point3DAnimationBase.cs
- XmlWrappingReader.cs
- TiffBitmapEncoder.cs
- PartialToken.cs
- Geometry3D.cs
- VisualStyleInformation.cs
- XmlAutoDetectWriter.cs
- ComAdminInterfaces.cs
- SystemException.cs
- objectresult_tresulttype.cs
- COM2EnumConverter.cs
- MissingFieldException.cs
- HttpVersion.cs
- WsrmMessageInfo.cs
- HttpMethodConstraint.cs
- ExpressionLexer.cs
- TransactionsSectionGroup.cs
- cache.cs
- WebServiceReceiveDesigner.cs
- Update.cs
- DurableServiceAttribute.cs
- OdbcDataReader.cs
- Annotation.cs
- SqlCachedBuffer.cs
- DataGridViewControlCollection.cs
- Soap12ProtocolReflector.cs
- XmlMembersMapping.cs
- HtmlInputPassword.cs
- AttributeXamlType.cs
- StringUtil.cs
- MetafileHeaderWmf.cs
- XmlUrlResolver.cs
- DataGridViewSelectedColumnCollection.cs
- ShaderRenderModeValidation.cs
- SrgsItemList.cs
- WeakRefEnumerator.cs
- ImageDrawing.cs
- FontFaceLayoutInfo.cs
- DataGridViewRowPostPaintEventArgs.cs
- InputGestureCollection.cs
- PtsContext.cs
- StringHelper.cs