Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- HttpEncoder.cs
- ImportCatalogPart.cs
- COMException.cs
- shaperfactory.cs
- SettingsPropertyValueCollection.cs
- NoResizeSelectionBorderGlyph.cs
- MenuItemCollection.cs
- SystemUnicastIPAddressInformation.cs
- TypeUnloadedException.cs
- QueryContinueDragEvent.cs
- TextLineBreak.cs
- TextElementAutomationPeer.cs
- LoaderAllocator.cs
- BaseCodePageEncoding.cs
- RangeValuePatternIdentifiers.cs
- HashHelper.cs
- TaskFormBase.cs
- _TLSstream.cs
- InputBuffer.cs
- x509store.cs
- ConvertersCollection.cs
- PartManifestEntry.cs
- SqlFactory.cs
- UriTemplateTrieNode.cs
- TemplateBindingExtensionConverter.cs
- DetailsView.cs
- TableCellCollection.cs
- CompositeScriptReference.cs
- Type.cs
- SemaphoreFullException.cs
- WebPartConnectionsCancelEventArgs.cs
- InputMethod.cs
- EditBehavior.cs
- KerberosReceiverSecurityToken.cs
- FrugalList.cs
- DataFormat.cs
- PnrpPeerResolver.cs
- OdbcTransaction.cs
- XhtmlBasicSelectionListAdapter.cs
- XmlArrayItemAttribute.cs
- DelayDesigner.cs
- EpmTargetPathSegment.cs
- processwaithandle.cs
- QueryOutputWriter.cs
- WindowAutomationPeer.cs
- InitializationEventAttribute.cs
- ItemChangedEventArgs.cs
- TextPatternIdentifiers.cs
- OleDbPropertySetGuid.cs
- HorizontalAlignConverter.cs
- ArgumentOutOfRangeException.cs
- PeerName.cs
- Win32NamedPipes.cs
- dataSvcMapFileLoader.cs
- UniformGrid.cs
- ProcessRequestArgs.cs
- PropertyValueUIItem.cs
- Number.cs
- StorageRoot.cs
- WsdlInspector.cs
- PropertySourceInfo.cs
- TextServicesContext.cs
- FocusChangedEventArgs.cs
- FlowPanelDesigner.cs
- ServiceBusyException.cs
- WebServiceClientProxyGenerator.cs
- ButtonBaseAdapter.cs
- SuppressMessageAttribute.cs
- ControlValuePropertyAttribute.cs
- Win32SafeHandles.cs
- StickyNoteContentControl.cs
- WorkflowMarkupSerializationException.cs
- StructuralCache.cs
- SymDocumentType.cs
- PackagingUtilities.cs
- NodeFunctions.cs
- PropertyPathConverter.cs
- DataGridColumnStyleMappingNameEditor.cs
- documentation.cs
- EventMap.cs
- PropertyReferenceExtension.cs
- ThemeInfoAttribute.cs
- localization.cs
- _SpnDictionary.cs
- BinaryMessageEncoder.cs
- TemporaryBitmapFile.cs
- SamlEvidence.cs
- ResourcePart.cs
- RoleBoolean.cs
- BCLDebug.cs
- EmptyElement.cs
- OdbcRowUpdatingEvent.cs
- XMLUtil.cs
- DataGridViewRowHeaderCell.cs
- HtmlInputHidden.cs
- Converter.cs
- TagPrefixCollection.cs
- TextHidden.cs
- ReturnValue.cs
- TransformGroup.cs