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
- VideoDrawing.cs
- InvalidCastException.cs
- DotExpr.cs
- HitTestFilterBehavior.cs
- StaticTextPointer.cs
- DrawToolTipEventArgs.cs
- ListGeneralPage.cs
- ValidatorAttribute.cs
- MethodAccessException.cs
- RectConverter.cs
- OdbcErrorCollection.cs
- RawUIStateInputReport.cs
- TypeEnumerableViewSchema.cs
- TextBoxBaseDesigner.cs
- Native.cs
- ImageList.cs
- TransactionChannelFactory.cs
- Message.cs
- SchemaComplexType.cs
- PlatformCulture.cs
- XmlAttributeAttribute.cs
- ReadOnlyDictionary.cs
- DeploymentSection.cs
- LocalizationParserHooks.cs
- PointUtil.cs
- SqlConnection.cs
- StyleSelector.cs
- TableCell.cs
- HtmlInputHidden.cs
- Point3D.cs
- mil_sdk_version.cs
- SqlDataSourceFilteringEventArgs.cs
- _IPv4Address.cs
- PrimitiveType.cs
- SettingsPropertyIsReadOnlyException.cs
- XmlUtil.cs
- ContentType.cs
- FixedLineResult.cs
- StackSpiller.cs
- StateFinalizationDesigner.cs
- SmtpReplyReader.cs
- SoundPlayerAction.cs
- URIFormatException.cs
- ReferentialConstraint.cs
- TextRunProperties.cs
- ComAdminInterfaces.cs
- ScriptRef.cs
- DataGridViewImageColumn.cs
- TemplateBindingExpression.cs
- PropertyTab.cs
- ProviderCollection.cs
- AspProxy.cs
- Events.cs
- QilInvokeLateBound.cs
- HitTestDrawingContextWalker.cs
- SqlLiftIndependentRowExpressions.cs
- DbParameterHelper.cs
- localization.cs
- XmlTypeMapping.cs
- RegexCompiler.cs
- IdentityHolder.cs
- FormsAuthenticationUser.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- WindowsSlider.cs
- SaveFileDialog.cs
- TemplateInstanceAttribute.cs
- DateTimeFormat.cs
- HttpWriter.cs
- ReadOnlyHierarchicalDataSource.cs
- GridLength.cs
- PeerInputChannel.cs
- StrokeIntersection.cs
- DependencySource.cs
- ToolboxItemAttribute.cs
- DetailsViewUpdatedEventArgs.cs
- PopupRootAutomationPeer.cs
- TextBox.cs
- DeflateEmulationStream.cs
- EngineSiteSapi.cs
- FontCacheUtil.cs
- CorrelationExtension.cs
- DisableDpiAwarenessAttribute.cs
- DecimalAnimationUsingKeyFrames.cs
- CanonicalXml.cs
- DataSourceComponent.cs
- InternalConfigSettingsFactory.cs
- IriParsingElement.cs
- XmlSchemaAttributeGroup.cs
- GridEntry.cs
- wgx_render.cs
- StdRegProviderWrapper.cs
- DatePickerAutomationPeer.cs
- MarshalByRefObject.cs
- _LazyAsyncResult.cs
- FontStretches.cs
- StyleTypedPropertyAttribute.cs
- ParagraphResult.cs
- DataContract.cs
- SingleAnimationUsingKeyFrames.cs
- XmlFormatMapping.cs