public WarningChartView() { MahApps.Metro.Controls.SplitButton btn = new SplitButton(); var initial = new WarningChartModel() { Name = "Initial", Number = 1, IDs = null }; var initialList = new List <WarningChartModel>() { initial }; Series = GroupsByNumberOfWarnings(initialList); Test = new ObservableCollection <string>(new string[] { "element1", "element2", "element3" }); InitializeMaterialDesign(); InitializeComponent(); // Places the UI where it needs to go this.Loaded += new RoutedEventHandler(MyWindow_Loaded); this.MyCustomLegend.StatusUpdated += new EventHandler(MyEventHandlerFunction_StatusUpdated); IsCheckedState = intToBool(Properties.Settings.Default.IsCheckedState); UpdateInterfaceLayout(); DataContext = this; }
private static PieSeries ChagnedSeries(WarningChartModel content, Brush color) { var series = new PieSeries { Values = new ChartValues <WarningChartPoint> { new WarningChartPoint { Number = content.Number, Title = content.Title, Name = content.Name } }, LabelPoint = labelPoint, PushOut = pushAmount, Tag = content.Name, Fill = color, Title = content.Title }; return(series); }