You cannot snap to a field in WPF, you need to change listto a property.
You call a dependency property FooListin its UserControland ResultListin the Xaml, but I'm guessing that a typo in the question.
You must implement INotifyPropertyChangedin Windowso that the Bindings know that the value has been updated.
, DataContext, Xaml ProblemView, , Window ElementName
<Window Name="window"
...>
<local:ProblemView HorizontalAlignment="Center"
VerticalAlignment="Center"
ResultList="{Binding ElementName=window,
Path=List}" />
</Window>
public partial class MainWindow : Window, INotifyPropertyChanged
{
private List<Problem> m_list;
public List<Problem> List
{
get { return m_list; }
set
{
m_list = value;
OnPropertyChanged("List");
}
}
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
private void OnPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
#endregion
}