private static void PieItemSources_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
     {
         foreach (PieCharItem item in e.NewItems)
         {
             item.PropertyChanged += Obj_PropertyChanged;
         }
     }
     _masterPieChar.ConstDataPie();
 }
        private static void OnAggregateNameChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            PieCharControl pieControl = (PieCharControl)d;

            if (pieControl.PieItemSources != null && pieControl.PieItemSources.Count() > 0)
            {
                pieControl.ConstDataPie();
            }
        }
        private static void OnPieItemSourcesChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            PieCharControl pieControl = (PieCharControl)d;

            _masterPieChar = pieControl;
            if (pieControl.PieItemSources != null && pieControl.PieItemSources.Count() > 0)
            {
                pieControl.PieItemSources.CollectionChanged += PieItemSources_CollectionChanged;
                foreach (var item in pieControl.PieItemSources)
                {
                    item.PropertyChanged += Obj_PropertyChanged;
                }
                pieControl.ConstDataPie();
            }
        }