private protected virtual FrameTemplateReadOnlyDictionary BuildDefaultNodeTemplateTable() { FrameTemplateDictionary DefaultDictionary = CreateDefaultTemplateDictionary(); List <Type> Keys = new List <Type>(DefaultDictionary.Keys); foreach (Type Key in Keys) { SetNodeTypeToDefault(DefaultDictionary, Key); } return(DefaultDictionary.ToReadOnly()); }
private protected virtual FrameTemplateReadOnlyDictionary BuildDefaultBlockListTemplate() { IList <Type> NodeKeys = NodeHelper.GetNodeKeys(); FrameTemplateDictionary DefaultDictionary = CreateEmptyTemplateDictionary(); foreach (Type Key in NodeKeys) { AddBlockNodeTypes(DefaultDictionary, Key); } FramePlaceholderFrame PatternFrame = (FramePlaceholderFrame)CreatePlaceholderFrame(); PatternFrame.PropertyName = nameof(IBlock.ReplicationPattern); FramePlaceholderFrame SourceFrame = (FramePlaceholderFrame)CreatePlaceholderFrame(); SourceFrame.PropertyName = nameof(IBlock.SourceIdentifier); IFrameHorizontalCollectionPlaceholderFrame CollectionPlaceholderFrame = CreateHorizontalCollectionPlaceholderFrame(); IFrameHorizontalPanelFrame RootFrame = CreateHorizontalPanelFrame(); RootFrame.Items.Add(PatternFrame); RootFrame.Items.Add(SourceFrame); RootFrame.Items.Add(CollectionPlaceholderFrame); FrameBlockTemplate RootTemplate = (FrameBlockTemplate)CreateBlockTemplate(); RootTemplate.NodeType = Type.FromTypeof <IBlock>(); RootTemplate.Root = RootFrame; RootFrame.UpdateParent(RootTemplate, GetRoot()); List <Type> BlockKeys = new List <Type>(DefaultDictionary.Keys); foreach (Type Key in BlockKeys) { DefaultDictionary[Key] = RootTemplate; } return(DefaultDictionary.ToReadOnly()); }