当前位置: 首页>>代码示例>>C#>>正文


C# FrameworkTemplate.ProcessTemplateBeforeSeal方法代码示例

本文整理汇总了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,
//.........这里部分代码省略.........
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:101,代码来源:StyleHelper.cs


注:本文中的System.Windows.FrameworkTemplate.ProcessTemplateBeforeSeal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。