Getting Started

This tutorial will walk you through the creation of a sample application that contains a RadTaskBoard control.

Assembly References

In order to use RadTaskBoard, you will need to add references to the following assemblies:

  • Telerik.Windows.Controls

You can find the required assemblies for each control from the suite in the Controls Dependencies help article.

Defining RadTaskBoard

The control can be populated in three different ways.

  • Binding to a collection of TaskBoardCardModel.
  • Binding to a collection of custom objects.
  • Binding to a CollectionView collection with predifined groups. For the purpose of this tutorial we are going to use the first one. The other approaches and more complex one can be found in the Populating With Data section.

First, we can go ahead and create our ViewModel with some tasks. The control API provides a built-in TaskBoardCardModel model class which exposes the most needed properties to start organizing your tasks.

Example 1: Defining ViewModel

public class MainViewModel 
{ 
    public ObservableCollection<TaskBoardCardModel> Data { get; set; } 
    public MainViewModel() 
    { 
        Data = GetTasks(); 
    } 
    public ObservableCollection<TaskBoardCardModel> GetTasks() 
    { 
        ObservableCollection<TaskBoardCardModel> tasks = new ObservableCollection<TaskBoardCardModel> 
        { 
            new TaskBoardCardModel() { Assignee = "Nancy Davolio", Description = "Task Description", State = "In Progress", Title = "Task Title" }, 
 
            new TaskBoardCardModel() { Assignee = "Andrew Fuller", Description = "Task Description", State = "Not Done", Title = "Task Title" }, 
 
            new TaskBoardCardModel() { Assignee = "Janet Leverling", Description = "Task Description", State = "Not Done", Title = "Task Title" }, 
 
            new TaskBoardCardModel() { Assignee = "Margaret Peacock", Description = "Task Description", State = "Not Done", Title = "Task Title" }, 
 
            new TaskBoardCardModel() { Assignee = "Steven Buchanan", Description = "Task Description", State = "Done", Title = "Task Title" }, 
 
            new TaskBoardCardModel() { Assignee = "Michael Suyama", Description = "Task Description", State = "Done", Title = "Task Title" }, 
 
            new TaskBoardCardModel() { Assignee = "Robert King", Description = "Task Description", State = "Done", Title = "Task Title" }, 
 
            new TaskBoardCardModel() { Assignee = "Laura Callahan", Description = "Task Description", State = "In Progress", Title = "Task Title" }, 
 
            new TaskBoardCardModel() { Assignee = "Anne Dodsworth", Description = "Task Description", State = "In Progress", Title = "Task Title" } 
        }; 
 
        return tasks; 
    } 
} 
Next we need to define RadTaskBoard in XAML, bind the ItemsSource property of the RadTaskBoard and set the GroupMemberPath property. The GroupMemberPath property indicates which property from your model will be used to group the tasks.

Example 2: Binding RadTaskBoard

<telerik:RadTaskBoard ItemsSource="{Binding Data}" GroupMemberPath="State" /> 
And finally, we need to set the DataContext of the MainWindow:

Example 3: Setting DataContext

public MainWindow()  
{  
    InitializeComponent();  
    this.DataContext = new MainViewModel();  
} 
If you run the application now, you should get a structure like in Figure 1:

Figure 1: RadTaskBoard with sample data

Telerik TaskBoard Getting-Started 0

See Also

In this article
Not finding the help you need? Improve this article