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
- BamlResourceSerializer.cs
- BitmapMetadata.cs
- TypeBuilderInstantiation.cs
- TagMapCollection.cs
- AutoResetEvent.cs
- WebSysDefaultValueAttribute.cs
- DataSetUtil.cs
- EnumMember.cs
- RightsManagementPermission.cs
- ItemCheckedEvent.cs
- DataProviderNameConverter.cs
- BufferedReadStream.cs
- RequiredFieldValidator.cs
- WindowProviderWrapper.cs
- ImageSource.cs
- TemplateXamlParser.cs
- IISMapPath.cs
- ToolStripMenuItem.cs
- XamlPoint3DCollectionSerializer.cs
- Dictionary.cs
- DocumentCollection.cs
- EndpointDispatcher.cs
- XmlObjectSerializerContext.cs
- ServiceContractGenerationContext.cs
- FontDialog.cs
- UserControlCodeDomTreeGenerator.cs
- PermissionAttributes.cs
- TypeDescriptorContext.cs
- CustomLineCap.cs
- XmlMapping.cs
- XmlName.cs
- EventMappingSettings.cs
- CodeFieldReferenceExpression.cs
- WinFormsUtils.cs
- MatcherBuilder.cs
- DataSourceControlBuilder.cs
- recordstatefactory.cs
- Pkcs7Recipient.cs
- Comparer.cs
- ColumnHeaderConverter.cs
- NavigationPropertyEmitter.cs
- XmlLinkedNode.cs
- CommandDevice.cs
- TextReader.cs
- PropertyGridView.cs
- ISessionStateStore.cs
- FlatButtonAppearance.cs
- SoapSchemaExporter.cs
- LocatorBase.cs
- IIS7WorkerRequest.cs
- SBCSCodePageEncoding.cs
- ProcessStartInfo.cs
- DataTableNewRowEvent.cs
- PersonalizationAdministration.cs
- PtsPage.cs
- NumericPagerField.cs
- TextElement.cs
- ActivityTypeResolver.xaml.cs
- WorkflowRuntimeBehavior.cs
- SqlInternalConnectionSmi.cs
- ByeOperation11AsyncResult.cs
- SqlBuilder.cs
- FieldToken.cs
- Constants.cs
- MailMessage.cs
- TableRowGroup.cs
- DispatchRuntime.cs
- DropDownButton.cs
- QueryAsyncResult.cs
- XmlC14NWriter.cs
- ActivityDesignerLayoutSerializers.cs
- KeyFrames.cs
- TemplatedEditableDesignerRegion.cs
- SqlConnectionPoolGroupProviderInfo.cs
- XhtmlBasicValidatorAdapter.cs
- SafeRightsManagementPubHandle.cs
- ResizeGrip.cs
- Drawing.cs
- ConfigPathUtility.cs
- PropertyStore.cs
- TdsParserSafeHandles.cs
- DataTableMapping.cs
- DataGrid.cs
- BufferedWebEventProvider.cs
- FlowStep.cs
- HostedTransportConfigurationBase.cs
- DbDataRecord.cs
- RefreshPropertiesAttribute.cs
- CodeCastExpression.cs
- TextTreeInsertElementUndoUnit.cs
- GroupBoxRenderer.cs
- ColorEditor.cs
- HttpApplication.cs
- ToolStripItemRenderEventArgs.cs
- ProgressBarHighlightConverter.cs
- CompositeClientFormatter.cs
- UDPClient.cs
- mactripleDES.cs
- SelectionProviderWrapper.cs
- NominalTypeEliminator.cs