Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- SerialErrors.cs
- Accessible.cs
- WebPartMovingEventArgs.cs
- SystemDiagnosticsSection.cs
- X509PeerCertificateAuthenticationElement.cs
- WorkflowPageSetupDialog.cs
- TogglePatternIdentifiers.cs
- UniqueIdentifierService.cs
- XmlSchemaGroup.cs
- CodeCatchClause.cs
- DataSet.cs
- DataSpaceManager.cs
- DefaultValueConverter.cs
- RandomDelaySendsAsyncResult.cs
- HttpInputStream.cs
- ChannelBinding.cs
- TypeRefElement.cs
- UriSection.cs
- ReadOnlyDataSource.cs
- DtdParser.cs
- GeneralTransformGroup.cs
- BamlRecords.cs
- GeometryConverter.cs
- IResourceProvider.cs
- Screen.cs
- TableLayoutCellPaintEventArgs.cs
- SchemaElementDecl.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- DataObjectCopyingEventArgs.cs
- DataSourceProvider.cs
- Run.cs
- LinqDataSourceUpdateEventArgs.cs
- ToolStripMenuItemDesigner.cs
- ProviderSettings.cs
- LinqDataSourceSelectEventArgs.cs
- ProcessExitedException.cs
- ApplicationSecurityInfo.cs
- FrameworkEventSource.cs
- SettingsBase.cs
- MemberPath.cs
- OptimalBreakSession.cs
- SafeCloseHandleCritical.cs
- UnsafeNativeMethods.cs
- DataPagerFieldCommandEventArgs.cs
- WebServiceData.cs
- GridViewDeletedEventArgs.cs
- DragEvent.cs
- CollaborationHelperFunctions.cs
- EntityCollection.cs
- HttpCapabilitiesBase.cs
- ServiceObjectContainer.cs
- Cursor.cs
- XsdBuilder.cs
- MessagePropertyAttribute.cs
- ImageSourceValueSerializer.cs
- DesignerCapabilities.cs
- ADMembershipProvider.cs
- ControlIdConverter.cs
- XmlSchemaSimpleContentExtension.cs
- sqlmetadatafactory.cs
- ErrorFormatter.cs
- DynamicResourceExtension.cs
- SQLRoleProvider.cs
- ImpersonationContext.cs
- EventItfInfo.cs
- ResumeStoryboard.cs
- InfoCardSymmetricCrypto.cs
- OleDbCommandBuilder.cs
- PermissionRequestEvidence.cs
- UpdatePanelTrigger.cs
- BitmapEffectvisualstate.cs
- ViewStateAttachedPropertyFeature.cs
- OperandQuery.cs
- DataGridViewCellPaintingEventArgs.cs
- InvalidCastException.cs
- MdiWindowListItemConverter.cs
- SqlConnectionManager.cs
- RuntimeHelpers.cs
- WebAdminConfigurationHelper.cs
- MethodCallConverter.cs
- ToolStripSystemRenderer.cs
- TraceRecords.cs
- ProcessModelSection.cs
- SamlSubject.cs
- StreamingContext.cs
- Label.cs
- CodeCompiler.cs
- TokenBasedSetEnumerator.cs
- DataGridAddNewRow.cs
- FactoryMaker.cs
- Types.cs
- PointLight.cs
- SqlDataSourceCache.cs
- Base64Stream.cs
- IISMapPath.cs
- UnmanagedMemoryStreamWrapper.cs
- SqlStatistics.cs
- QueueProcessor.cs
- BasePattern.cs
- DataErrorValidationRule.cs