I\'m using Silverlight on Windows Phone 7.
Is it normal to get loads of \"BindingExpression path error\" debug messages when using a VirtualizingStackPanel? I think it
I know this post is pretty old, but a solution without creating the dummy properties is making sure the DataContext of the items can only be of the type you expect.
I do this with the following converter on the root of the data template:
public class SpecificTypeConverter : IValueConverter
{
public string Type { get; set; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null || value.GetType().FullName == this.Type)
{
return value;
}
return DependencyProperty.UnsetValue;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
Add a static resource like this:
And in the data template, use the converter:
Now the Name property of the parent will never be checked.