Access Violation when bind to collection
Posted: 22 Mar 2015, 04:43
Unhandled exception at 0x2BD24F92: Access Violation reading location 0x00000070
I cannot figure out if i am doing this wrong or if its a bug. Property and binding below. I get the access error for every item in the collection when i click the combo box.
I cannot figure out if i am doing this wrong or if its a bug. Property and binding below. I get the access error for every item in the collection when i click the combo box.
Code: Select all
private ObservableCollection<string> _categories = new ObservableCollection<string>();
public ObservableCollection<string> Categories {
get { return _categories; }
set {
if (_categories != value) {
_categories = value;
OnPropertyChanged("Categories");
}
}
}Code: Select all
<ComboBox x:Name="CategoryBox" ItemsSource="{Binding Categories}" />