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
- DataGridPreparingCellForEditEventArgs.cs
- ZipIOExtraFieldElement.cs
- SafeRegistryHandle.cs
- SQLInt32Storage.cs
- GridItemPattern.cs
- Queue.cs
- LogEntrySerialization.cs
- WebPartRestoreVerb.cs
- XmlStreamNodeWriter.cs
- VBIdentifierName.cs
- TemplateControlBuildProvider.cs
- Query.cs
- ListItemCollection.cs
- XPathNodeHelper.cs
- ExceptionHandlersDesigner.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- HttpListenerPrefixCollection.cs
- MsmqIntegrationChannelFactory.cs
- AnonymousIdentificationModule.cs
- TableCellCollection.cs
- ToolStripDesignerUtils.cs
- Floater.cs
- CounterCreationDataCollection.cs
- EntityModelSchemaGenerator.cs
- ProviderUtil.cs
- RoleGroupCollection.cs
- _DigestClient.cs
- SharedDp.cs
- _ProxyChain.cs
- DataGridColumnStyleMappingNameEditor.cs
- RuleDefinitions.cs
- SiteMapNodeCollection.cs
- PeerInvitationResponse.cs
- WebPartDisplayModeCollection.cs
- DataGridViewAutoSizeModeEventArgs.cs
- SoapHttpTransportImporter.cs
- XmlCustomFormatter.cs
- NativeMethods.cs
- GotoExpression.cs
- SmtpNtlmAuthenticationModule.cs
- ObjectStateFormatter.cs
- OverlappedAsyncResult.cs
- InternalConfigSettingsFactory.cs
- ContentTextAutomationPeer.cs
- HelpInfo.cs
- VisualTarget.cs
- CodeArrayCreateExpression.cs
- ContextProperty.cs
- AuthorizationContext.cs
- MetabaseSettings.cs
- ObjectDataSourceMethodEventArgs.cs
- GiveFeedbackEventArgs.cs
- QueueProcessor.cs
- Axis.cs
- CategoryNameCollection.cs
- UInt16Storage.cs
- CharKeyFrameCollection.cs
- XmlHierarchyData.cs
- DistinctQueryOperator.cs
- XmlQueryRuntime.cs
- MenuRendererStandards.cs
- FormViewDeleteEventArgs.cs
- FixUpCollection.cs
- _HTTPDateParse.cs
- IisTraceListener.cs
- propertytag.cs
- mansign.cs
- TemplateField.cs
- PolicyFactory.cs
- NonClientArea.cs
- ValidationEventArgs.cs
- ClusterRegistryConfigurationProvider.cs
- CodeExpressionStatement.cs
- SendKeys.cs
- OdbcCommand.cs
- GridViewPageEventArgs.cs
- MiniMapControl.xaml.cs
- SelectedDatesCollection.cs
- wmiprovider.cs
- _SslState.cs
- MailSettingsSection.cs
- HeaderUtility.cs
- Part.cs
- LongTypeConverter.cs
- OrderPreservingSpoolingTask.cs
- ReferenceEqualityComparer.cs
- SoapAttributeOverrides.cs
- UnsafeNativeMethodsMilCoreApi.cs
- WebServiceAttribute.cs
- WebPartConnection.cs
- SafeProcessHandle.cs
- TypeForwardedToAttribute.cs
- GeometryHitTestParameters.cs
- KnownBoxes.cs
- DataReaderContainer.cs
- TimeSpanHelper.cs
- StandardOleMarshalObject.cs
- RegexGroup.cs
- NavigationProgressEventArgs.cs
- MessageBox.cs