dotnet / dotnet/dotnet-api-docs

Constraints on WPF CollectionContainer.Source

Open
#5,385 4 comments 0 reactions 0 assignees View on GitHub
area-WPF Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

After some research I found out why my bindings on a CollectionContainer (see https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Windows.Data/CollectionContainer.xml ) don't work.
Found a workaround in https://social.msdn.microsoft.com/Forums/vstudio/en-US/b15cbd9d-95aa-47c6-8068-7ae9f7dca88a/collectioncontainer-does-not-support-relativesource?forum=wpf and I'm not sure this is fixed in more up to date versions of WPF (currently we're still on .NET Framework).

The current documentation in https://docs.microsoft.com/en-us/dotnet/api/system.windows.data.collectioncontainer.collection?view=net-5.0#xaml-text-usage suggests,
"In XAML, you can use the Binding syntax to bind to a collection. For more information, see the Binding type."

This obviously isn't helpful when only a very small subset is supported.
That should be mentioned IMHO.

Unfortunately as I'm not sure about the exact restrictions (beyond what's in the social.msdn article linked above) I don't feel comfortable to propose a valid text here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.