Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / Markup / TemplateApplicationHelper.cs / 1 / TemplateApplicationHelper.cs
/****************************************************************************\ * * File: TemplateApplicationHelper.cs * * Copyright (C) 2005 by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using MS.Internal; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Windows.Markup; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Controls; using System.Collections.Specialized; namespace System.Windows { //+--------------------------------------------------------------------------------------------- // // Class TemplateApplicationHelper // // This class is a BamlRecordReader which is used to help instantiate a template. // This BamlRecordReader is used to instantiate the unshareable content of the template, // and we override SetDependencyValue here so that we can set values into // the FE's special store for ParentTemplate values. // //+--------------------------------------------------------------------------------------------- internal class TemplateApplicationHelper : BamlRecordReader { internal TemplateApplicationHelper ( ) { RootList = new ArrayList(1); } // // Initialization is separate from the constructer so that it can be called // repeatedly. // internal void Initialize( ParserContext parserContext, object templatedParent ) { ParserContext = parserContext; _templatedParent = (DependencyObject) templatedParent; RootElement = null; if( RootList != null ) { RootList.Clear(); } ContextStack.Clear(); ComponentConnector = null; } /***************************************************************************\ * * TemplateBamlRecordReader.ReadDeferableContentStart * * Called when parsing the deferable content start element. * When we have a ResourceDictionary inside template content, * we need to retrieve the cached values buffer and supply it * do the ResourceDictionary so that it can use it to * RealizeDeferredContent. * \***************************************************************************/ internal override void ReadDeferableContentStart( BamlDeferableContentStartRecord bamlRecord) { ResourceDictionary dictionary = GetDictionaryFromContext(CurrentContext, true /*toInsert*/) as ResourceDictionary; if (dictionary != null) { // Read and create the keys and the static resource // objects for this dictionary ArrayList defKeyList; List
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AccessViolationException.cs
- UTF7Encoding.cs
- DetailsViewRowCollection.cs
- DictionaryMarkupSerializer.cs
- PriorityQueue.cs
- RequestTimeoutManager.cs
- SoapAttributeOverrides.cs
- InputElement.cs
- XmlSchemaExternal.cs
- Quad.cs
- FileRecordSequenceCompletedAsyncResult.cs
- EdmConstants.cs
- ResXBuildProvider.cs
- RootBrowserWindow.cs
- SoapUnknownHeader.cs
- HttpHeaderCollection.cs
- SqlClientMetaDataCollectionNames.cs
- HtmlControlDesigner.cs
- SmtpFailedRecipientsException.cs
- PrintDialog.cs
- CodeCommentStatementCollection.cs
- ResourcesChangeInfo.cs
- CallTemplateAction.cs
- DetailsViewInsertedEventArgs.cs
- CultureSpecificCharacterBufferRange.cs
- VisualTreeHelper.cs
- TimeZoneInfo.cs
- ConfigurationManagerInternalFactory.cs
- UserControlCodeDomTreeGenerator.cs
- DataTableReader.cs
- Vector3DCollection.cs
- ToolStripItemClickedEventArgs.cs
- NameSpaceExtractor.cs
- SingleTagSectionHandler.cs
- NCryptNative.cs
- ComponentManagerBroker.cs
- MenuItemStyle.cs
- ConstNode.cs
- TableHeaderCell.cs
- CaseExpr.cs
- MetadataFile.cs
- ErrorProvider.cs
- HttpPostedFile.cs
- ReverseComparer.cs
- FormatConvertedBitmap.cs
- SiteOfOriginPart.cs
- InvokePattern.cs
- OrderedHashRepartitionEnumerator.cs
- PolyLineSegmentFigureLogic.cs
- DataListItemEventArgs.cs
- MemoryMappedFileSecurity.cs
- AddInProcess.cs
- DataGridViewCellValueEventArgs.cs
- XhtmlBasicControlAdapter.cs
- ListenerAdaptersInstallComponent.cs
- StorageTypeMapping.cs
- PartitionerQueryOperator.cs
- RunClient.cs
- WebPartConnectionsCancelVerb.cs
- XslAstAnalyzer.cs
- StringResourceManager.cs
- Lookup.cs
- JsonDataContract.cs
- Rect.cs
- PointHitTestResult.cs
- XmlEnumAttribute.cs
- HttpHandlersInstallComponent.cs
- DataColumnChangeEvent.cs
- DataSetUtil.cs
- WindowsAuthenticationEventArgs.cs
- DebugHandleTracker.cs
- Asn1IntegerConverter.cs
- ErrorHandler.cs
- WebPartTransformer.cs
- XPathNodeInfoAtom.cs
- NotifyInputEventArgs.cs
- SecureUICommand.cs
- ProcessInputEventArgs.cs
- Timer.cs
- User.cs
- MenuItemCollection.cs
- GeneralTransform2DTo3DTo2D.cs
- CallId.cs
- WebPartVerb.cs
- Vertex.cs
- DoubleIndependentAnimationStorage.cs
- WebPartDisplayMode.cs
- AccessViolationException.cs
- DateTimeFormat.cs
- ProfileService.cs
- ChangeProcessor.cs
- ScriptControlDescriptor.cs
- DirectoryObjectSecurity.cs
- SqlFlattener.cs
- FontFaceLayoutInfo.cs
- CopyOnWriteList.cs
- PageFunction.cs
- SequentialUshortCollection.cs
- DataGridViewToolTip.cs
- BitmapCodecInfo.cs