/// <summary> /// Exposes virtual protected for testing. /// </summary> /// <param name="oldValue">The old Value.</param> /// <param name="newValue">The new Value.</param> protected override void OnItemDefinitionSelectorPropertyChanged(TreeMapItemDefinitionSelector oldValue, TreeMapItemDefinitionSelector newValue) { base.OnItemDefinitionSelectorPropertyChanged(oldValue, newValue); if (OnItemDefinitionSelectorPropertyChangedEvent != null) { OnItemDefinitionSelectorPropertyChangedEvent(oldValue, newValue); } }
/// <summary> /// Called when the value of the TreeMapItemDefinitionSelectorProperty property changes. /// </summary> /// <param name="d">Reference to the TreeMap object.</param> /// <param name="e">Event handler arguments.</param> private static void OnItemDefinitionSelectorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (d is TreeMap treeMap) { TreeMapItemDefinitionSelector oldValue = e.OldValue as TreeMapItemDefinitionSelector; TreeMapItemDefinitionSelector newValue = e.NewValue as TreeMapItemDefinitionSelector; treeMap.OnItemDefinitionSelectorPropertyChanged(oldValue, newValue); } }
/// <summary> /// Called when the value of the ItemDefinitionSelectorProperty property changes. /// Triggers a recalculation of the layout. /// </summary> /// <param name="oldValue">The old selector.</param> /// <param name="newValue">The new selector.</param> protected virtual void OnItemDefinitionSelectorPropertyChanged(TreeMapItemDefinitionSelector oldValue, TreeMapItemDefinitionSelector newValue) { RebuildTree(); }