Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a class defined with a static list. Note: I realize both are public right now, that is due to some testing non-sense...

class Breadcrumbs
{
public static List<Breadcrumb> _crumbs = new List<Breadcrumb>();

public List<Breadcrumb> GetCrumbs()
{
return _crumbs;
}  
}


I'm trying to bind this to a CollectionViewSource.

<CollectionViewSource
            x:Name="BreadcrumbsViewSource"
            Source="{Binding GetCrumbs, Source=local:Breadcrumbs}"/>


And then I want to bind that view source to an ItemsControl.

<ItemsControl ItemsSource="{StaticResource BreadcrumbsViewSource}">


The code compiles but does not run. For some reason the CollectionViewSource does not bind at all.

I'm new to XAML, WPF, and Windows 8 Store apps so I'm sure it is something fairly trivial that I am over looking. All the solutions I have found using Google don't work with Windows Store apps.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900