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
- Rotation3D.cs
- PolicyException.cs
- SegmentInfo.cs
- XPathDocumentBuilder.cs
- _SslStream.cs
- InArgumentConverter.cs
- CriticalFinalizerObject.cs
- ObjectDisposedException.cs
- Win32.cs
- WebBrowserNavigatingEventHandler.cs
- ItemChangedEventArgs.cs
- ConsoleTraceListener.cs
- RIPEMD160Managed.cs
- ExceptionNotification.cs
- BindingListCollectionView.cs
- BooleanConverter.cs
- SHA384Managed.cs
- DPCustomTypeDescriptor.cs
- XmlSchemaCollection.cs
- ContextStaticAttribute.cs
- XmlSerializationGeneratedCode.cs
- InlineCollection.cs
- UTF7Encoding.cs
- XmlDataImplementation.cs
- Int32Collection.cs
- NegationPusher.cs
- RawTextInputReport.cs
- SecurityUtils.cs
- NavigateUrlConverter.cs
- CodeArrayCreateExpression.cs
- TagMapCollection.cs
- CompilationUnit.cs
- FilterQuery.cs
- WaitHandle.cs
- EnumValAlphaComparer.cs
- Int32RectValueSerializer.cs
- DataGridViewCellStyle.cs
- GeneratedCodeAttribute.cs
- GeometryDrawing.cs
- StaticResourceExtension.cs
- ViewPort3D.cs
- WmlControlAdapter.cs
- ConnectionOrientedTransportElement.cs
- CompatibleComparer.cs
- DateTimeFormatInfo.cs
- TreeChangeInfo.cs
- OdbcError.cs
- ParsedAttributeCollection.cs
- AssociationSetMetadata.cs
- EntityConnectionStringBuilderItem.cs
- TrailingSpaceComparer.cs
- ListItemCollection.cs
- ParameterBinding.cs
- XslException.cs
- SqlIdentifier.cs
- SubMenuStyleCollection.cs
- WebPartCollection.cs
- TrackingServices.cs
- AuthorizationRuleCollection.cs
- DesigntimeLicenseContext.cs
- WebConfigurationHost.cs
- _NetworkingPerfCounters.cs
- UserControlCodeDomTreeGenerator.cs
- CommandPlan.cs
- TraceHandlerErrorFormatter.cs
- ExtentKey.cs
- SerialErrors.cs
- ColumnResult.cs
- PriorityItem.cs
- MissingFieldException.cs
- Sequence.cs
- SoapAttributeOverrides.cs
- Calendar.cs
- LeaseManager.cs
- FramingDecoders.cs
- StringComparer.cs
- TimeEnumHelper.cs
- RequestResizeEvent.cs
- OperationInvokerTrace.cs
- PriorityChain.cs
- CheckStoreFileValidityRequest.cs
- OwnerDrawPropertyBag.cs
- CodeRemoveEventStatement.cs
- InfoCardRSACryptoProvider.cs
- XmlArrayItemAttribute.cs
- TagMapInfo.cs
- Utility.cs
- AlphaSortedEnumConverter.cs
- ObjectSecurity.cs
- SafeNativeMethods.cs
- MobileControlsSectionHelper.cs
- WSAddressing10ProblemHeaderQNameFault.cs
- DesignerCapabilities.cs
- StylusButton.cs
- EntityTypeEmitter.cs
- OdbcFactory.cs
- Inline.cs
- Mapping.cs
- Pen.cs
- TypeSystem.cs