Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / AppModel / NavigationHelper.cs / 1305600 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpListener.cs
- ResourceManager.cs
- ListViewContainer.cs
- PersonalizableTypeEntry.cs
- EmbossBitmapEffect.cs
- LogLogRecordEnumerator.cs
- XmlArrayAttribute.cs
- Route.cs
- DocumentPageViewAutomationPeer.cs
- PerfService.cs
- ReceiveDesigner.xaml.cs
- _ListenerResponseStream.cs
- AssemblyAssociatedContentFileAttribute.cs
- SmiEventSink_DeferedProcessing.cs
- KeySplineConverter.cs
- ImageSourceConverter.cs
- SqlDeflator.cs
- DataServiceResponse.cs
- ItemCheckEvent.cs
- DefaultAssemblyResolver.cs
- PrePrepareMethodAttribute.cs
- newitemfactory.cs
- AsnEncodedData.cs
- XmlBoundElement.cs
- Util.cs
- DataServiceRequestOfT.cs
- XsdDuration.cs
- DataBindingHandlerAttribute.cs
- DecimalSumAggregationOperator.cs
- HtmlControl.cs
- TokenCreationException.cs
- ViewPort3D.cs
- CollectionContainer.cs
- OAVariantLib.cs
- JapaneseCalendar.cs
- WCFModelStrings.Designer.cs
- XmlTextWriter.cs
- Evidence.cs
- RTLAwareMessageBox.cs
- OleDbError.cs
- SizeValueSerializer.cs
- WorkItem.cs
- DataGridBeginningEditEventArgs.cs
- relpropertyhelper.cs
- SqlCharStream.cs
- ToolStripSeparator.cs
- XmlSerializationGeneratedCode.cs
- CompilerError.cs
- ValidationErrorCollection.cs
- BrowserDefinition.cs
- RequestCachePolicy.cs
- OptimizedTemplateContent.cs
- TransactionChannel.cs
- ProfileGroupSettingsCollection.cs
- FileDialogPermission.cs
- PointValueSerializer.cs
- Predicate.cs
- GeneralTransform3D.cs
- DefaultValidator.cs
- XmlReaderSettings.cs
- CollectionEditorDialog.cs
- SizeAnimationUsingKeyFrames.cs
- FontConverter.cs
- DbReferenceCollection.cs
- RelativeSource.cs
- TextBoxRenderer.cs
- DataGridViewAdvancedBorderStyle.cs
- StreamWithDictionary.cs
- VectorValueSerializer.cs
- PrinterUnitConvert.cs
- ServicesUtilities.cs
- ScriptHandlerFactory.cs
- ErrorWrapper.cs
- AspNetHostingPermission.cs
- HandlerWithFactory.cs
- HMACSHA384.cs
- SymmetricSecurityProtocolFactory.cs
- ExpressionParser.cs
- PlainXmlWriter.cs
- PropertySourceInfo.cs
- SeparatorAutomationPeer.cs
- exports.cs
- KeyInstance.cs
- PersistenceTypeAttribute.cs
- TemplateBuilder.cs
- Util.cs
- ColorTransform.cs
- PropertyRecord.cs
- DesignerActionHeaderItem.cs
- WebControlsSection.cs
- SmtpReplyReader.cs
- Block.cs
- ProcessModelSection.cs
- BuiltInExpr.cs
- DecoderBestFitFallback.cs
- DocumentXPathNavigator.cs
- CorrelationManager.cs
- AstTree.cs
- SqlClientWrapperSmiStreamChars.cs
- WindowPattern.cs