Completed
Last Updated: 26 Oct 2017 10:48 by ADMIN
ADMIN
Petar Mladenov
Created on: 07 Feb 2017 13:18
Category: BreadCrumb
Type: Bug Report
1
Breadcrumb: CurrentItem is not automatically set when the DataContext is set at runtime
When DataContext is set in XAML, CurrentItem is automatically set and if you have set ImagePath - the root header image will be displayed in the breadcrumb.

If DataContext is set at runtime - the CurrentItem is not internally set properly and the root image is not shown.



The workaround is setting the CurrentItem after setting the DataContext. 

For example:

 private void Button_Click(object sender, RoutedEventArgs e)
        {
            this.DataContext = new MainViewModel();
            this.breadCrumb.CurrentItem = (this.DataContext as MainViewModel).Root;
        }


0 comments