I am trying to set the Items of the BreadCrumb programmatically. When One of the items changes I want the BreadCrumb to display the levels automatically, and not have to click on each item to set it.
I am using the below as a sample snippet.
I am using the below as a sample snippet.
Data = new ObservableCollection<RadBreadcrumbItem>();
var brian = new RadBreadcrumbItem { Header = "Brian" };
var bart = new RadBreadcrumbItem { Header = "Bart" };
var ryan = new RadBreadcrumbItem { Header = "Ryan" };
var jay = new RadBreadcrumbItem { Header = "Jay" };
ryan.Items.Add(bart);
ryan.Items.Add(jay);
brian.Items.Add(ryan);
Data.Add(brian);
Root =
new RadBreadcrumbItem {ItemsSource = Data};
I want it to show by default as Brian/Ryan/Bart
But like this I have to click each item in the BreadCrumb to set the item.
How to do this programtatically?