Dictionaries

Just as ResourceDictionaries are used to house resources in regular WPF, I employ a set of seven different dictionaries in WPF Composites (defined below) to store many things including the Composites in a Parent (all by guid key) as well as the Children in all Composites within a parent (all by key-row-column.)

Here is an example snapshot from the VS debugger of Dictionaries stored on the tag property of a WrapPanel:
dictionaries_pic.png

Seven Types of Dictionaries

1. SETTINGS DICTIONARY
The Parent Container's Tag property contains a Dictionary for storing properties/settings

2. COMPOSITE_LOOKUP DICTIONARY
CompositeLookup Dictionary is another dictionary stored inside the main one that also contains all rows (Borders) by key, e.g. guid

3. CHILD_LOOKUP DICTIONARY
ChildLookup Dictionary is another dictionary stored inside the main one that also contains all elements by fine-grained key, e.g. guid-0-1

4. DISPOSABLES DICTIONARY
DisposablesDictionary is another dictionary stored inside the main one that also contains all the IDisposables (an ObservableDisposable) for unsubscribing events

5. ORDERED KEY LIST
Added a new OrderedKeyList to store all the keys in order added in a List<string>.

6. ATTACHED PROPERTIES DICTIONARY
AttachedPropertiesDict is another dictionary stored inside the main one that also contains all settings that are to be applied as Attached Properties

7. ATTACHED PROPERTIES BY ROWCOL DICTIONARY
AttachedPropertiesByRowColDict is another dictionary stored inside the main one that also contains all settings that are to be applied as Attached Properties at a specific row-column position.

NOTE: you can FIND each spot in code where items are added to these dictionaries
by doing a FIND on the string "ADD-TO-DICTIONARY BOOKMARK" (replacing the dashes with an underscore.)

Last edited Jan 26 at 6:54 AM by stagathome0069, version 25

Comments

No comments yet.