private static void OnAggregateNameChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { PieCharControl pieControl = (PieCharControl)d; if (pieControl.PieItemSources != null && pieControl.PieItemSources.Count() > 0) { pieControl.ConstDataPie(); } }
/// <summary> /// 标题更改事件 /// </summary> /// <param name="d"></param> /// <param name="e"></param> private static void OnTitleNameChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { PieCharControl pieControl = (PieCharControl)d; if (pieControl._titleText != null) { pieControl._titleText.Text = pieControl.TitleName; } }
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(); } }