本文整理汇总了C#中System.Windows.FrameworkTemplate.ProcessTemplateBeforeSeal方法的典型用法代码示例。如果您正苦于以下问题:C# FrameworkTemplate.ProcessTemplateBeforeSeal方法的具体用法?C# FrameworkTemplate.ProcessTemplateBeforeSeal怎么用?C# FrameworkTemplate.ProcessTemplateBeforeSeal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.FrameworkTemplate
的用法示例。
在下文中一共展示了FrameworkTemplate.ProcessTemplateBeforeSeal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SealTemplate
// ===========================================================================
// These methods are invoked when a Style/Template is Sealed
// ===========================================================================
#region WriteMethods
//
// This method
// 1. Seals a template
//
internal static void SealTemplate(
FrameworkTemplate frameworkTemplate,
ref bool isSealed,
FrameworkElementFactory templateRoot,
TriggerCollection triggers,
ResourceDictionary resources,
HybridDictionary childIndexFromChildID,
ref FrugalStructList<ChildRecord> childRecordFromChildIndex,
ref FrugalStructList<ItemStructMap<TriggerSourceRecord>> triggerSourceRecordFromChildIndex,
ref FrugalStructList<ContainerDependent> containerDependents,
ref FrugalStructList<ChildPropertyDependent> resourceDependents,
ref ItemStructList<ChildEventDependent> eventDependents,
ref HybridDictionary triggerActions,
ref HybridDictionary dataTriggerRecordFromBinding,
ref bool hasInstanceValues,
ref EventHandlersStore eventHandlersStore)
{
Debug.Assert(frameworkTemplate != null );
// This template has already been sealed.
// There is no more to do.
if (isSealed)
{
return;
}
// Seal template nodes (if exists)
if (frameworkTemplate != null)
{
frameworkTemplate.ProcessTemplateBeforeSeal();
}
if (templateRoot != null)
{
Debug.Assert( !frameworkTemplate.HasXamlNodeContent );
// Seal the template
Debug.Assert(frameworkTemplate != null);
//frameworkTemplate.ProcessTemplateBeforeSeal();
templateRoot.Seal(frameworkTemplate);
}
// Seal triggers
if (triggers != null)
{
triggers.Seal();
}
// Seal Resource Dictionary
if (resources != null)
{
resources.IsReadOnly = true;
}
// Build shared tables
if (templateRoot != null)
{
// This is a FEF-style template. Process the root node, and it will
// recurse through the rest of the FEF tree.
StyleHelper.ProcessTemplateContentFromFEF(
templateRoot,
ref childRecordFromChildIndex,
ref triggerSourceRecordFromChildIndex,
ref resourceDependents,
ref eventDependents,
ref dataTriggerRecordFromBinding,
childIndexFromChildID,
ref hasInstanceValues);
}
// Process Triggers. (Trigger PropertyValues are inserted
// last into the Style/Template GetValue chain because they
// are the highest priority)
bool hasHandler = false;
Debug.Assert( frameworkTemplate != null );
StyleHelper.ProcessTemplateTriggers(
triggers,
frameworkTemplate,
ref childRecordFromChildIndex,
ref triggerSourceRecordFromChildIndex, ref containerDependents, ref resourceDependents, ref eventDependents,
ref dataTriggerRecordFromBinding, childIndexFromChildID, ref hasInstanceValues,
//.........这里部分代码省略.........