private void EnsureElementsCreated() { if (this.mappedElements == null) { this.mappedElements = new StylesheetTreeNodeElementDictionary(); } }
private NodeElementEntry AddElementEntry(RadElement conditionCheckTargetElement, RadElement element) { if (this.mappedElements == null) { this.mappedElements = new StylesheetTreeNodeElementDictionary(); } NodeElementEntry result = new NodeElementEntry(conditionCheckTargetElement, element, this); this.mappedElements[element] = result; return(result); }
public void DetachElements() { if (this.mappedElements != null) { if (this.propertySettingGroups != null) { foreach (NodeElementEntry elementEntry in this.mappedElements.Values) { this.ManagePropetyChangeSubscription(elementEntry, false); for (int i = 0; i < this.propertySettingGroups.Count; i++) { foreach (IPropertySetting setting in this.propertySettingGroups[i].PropertySettings.EnumeratePropertySettingsForElement(elementEntry.Element)) { setting.UnapplyValue(elementEntry.Element); if (setting is AnimatedPropertySetting) { elementEntry.Element.ResetValue(setting.Property, ValueResetFlags.Style); } } } } this.propertySettingGroups.Clear(); this.propertySettingGroups = null; } this.mappedElements.Clear(); this.mappedElements = null; } if (this.nodes != null) { foreach (StylesheetTreeNode node in this.nodes) { node.DetachElements(); } this.nodes.Clear(); this.nodes = null; } this.ownerTree = null; }