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
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- DataGridViewCellStyleBuilderDialog.cs
- StateDesigner.CommentLayoutGlyph.cs
- ExtensibleClassFactory.cs
- GCHandleCookieTable.cs
- TextWriter.cs
- InitializationEventAttribute.cs
- GridViewAutomationPeer.cs
- Imaging.cs
- AliasedSlot.cs
- DataSourceControl.cs
- TypeBuilder.cs
- HandledMouseEvent.cs
- SQLDouble.cs
- _FtpControlStream.cs
- LowerCaseStringConverter.cs
- BinaryNode.cs
- XmlDocumentType.cs
- Size.cs
- Label.cs
- COM2IDispatchConverter.cs
- PointLight.cs
- PreservationFileReader.cs
- IImplicitResourceProvider.cs
- Thread.cs
- RegexEditorDialog.cs
- MediaTimeline.cs
- XmlRawWriter.cs
- TextAnchor.cs
- ConfigurationElementProperty.cs
- AmbientValueAttribute.cs
- XmlSchemaElement.cs
- ValidatingPropertiesEventArgs.cs
- DataObject.cs
- PropertiesTab.cs
- UniqueIdentifierService.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- ClientSponsor.cs
- MessageAction.cs
- SecuritySessionFilter.cs
- ValueTable.cs
- SettingsAttributes.cs
- HandledMouseEvent.cs
- DirectoryNotFoundException.cs
- FlowPosition.cs
- RemotingServices.cs
- UIElement.cs
- autovalidator.cs
- XmlSchemaSet.cs
- HttpApplicationFactory.cs
- QilXmlWriter.cs
- WmlPanelAdapter.cs
- CompositeControl.cs
- DataGridViewTopRowAccessibleObject.cs
- EventKeyword.cs
- StyleXamlTreeBuilder.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- NamespaceList.cs
- LineGeometry.cs
- CellIdBoolean.cs
- JoinElimination.cs
- EventSourceCreationData.cs
- ServiceBusyException.cs
- ReflectTypeDescriptionProvider.cs
- BaseTemplateBuildProvider.cs
- ServiceNameElement.cs
- InheritanceUI.cs
- MonthCalendar.cs
- NegotiateStream.cs
- XmlCharCheckingWriter.cs
- TextTreeInsertElementUndoUnit.cs
- LayoutExceptionEventArgs.cs
- TextAutomationPeer.cs
- ToolstripProfessionalRenderer.cs
- ConfigXmlComment.cs
- EntitySqlQueryCacheKey.cs
- C14NUtil.cs
- Win32SafeHandles.cs
- Image.cs
- InfoCardSymmetricAlgorithm.cs
- StringUtil.cs
- SamlSubject.cs
- SubclassTypeValidator.cs
- SecurityRuntime.cs
- NullToBooleanConverter.cs
- GeometryGroup.cs
- BuildResult.cs
- OdbcDataAdapter.cs
- NamedPipeHostedTransportConfiguration.cs
- TextAdaptor.cs
- TextReader.cs
- PlainXmlWriter.cs
- DescendentsWalkerBase.cs
- AtomicFile.cs
- WindowInteractionStateTracker.cs
- FontCollection.cs
- MailAddressCollection.cs
- PriorityChain.cs
- SqlCacheDependencyDatabase.cs
- OLEDB_Util.cs