RadiantQ WPF Gantt
How to parse and get hold of all the UI elements representing a task bar in the FlexyGantt's chart?
Previous Topic  Next Topic 

How to parse and get hold of all the UI elements representing a task bar in the FlexyGantt's chart?


Assuming each row in the FlexyGantt is of type Employee (you might have a hierarchy in which case each row's data will be of different type) and the tasks are of type Task, you can do this to parse and get hold of the UI elements representing the tasks:


        private void ButtonClick(object sender, MouseButtonEventArgs e)

        {

            List<TasksListControl> list = new List<TasksListControl>();

            Extensions.GetChildren<TasksListControl>(this.fxgantt.GanttChart.VerticalScrollViewerElement, ref list, false, false);

            foreach (TasksListControl rowUI in list)

            {

                Employee emp = (rowUI.DataContext as FlexyNodeData).Data as Employee;

                List<TaskItemControl> taskBarUIList = new List<TaskItemControl>();

                Extensions.GetChildren<TaskItemControl>(rowUI, ref taskBarUIList, false, false);


                foreach (TaskItemControl taskBarUI in taskBarUIList)

                {

                    Task task = taskBarUI.DataContext as Task;

                }

            }

        }



� RadiantQ 2009 - 2019. All Rights Reserved.