Skip to content

[MVUX][C# Markup] Unable to bind Custom Control's Collection Dependency Property to consumer IListState<> #2311

Answered by dr1rrb
kucint asked this question in Q&A
Discussion options

You must be logged in to vote
  • Q3: but shouldn't it rather be new ObservableCollection<object>() / new ObservableCollection<string>() respectively?
    My thinking is that MyControl does not necessarily will be used with a MVUX/MVVM model that creates ICollectionView under the hood. if none of MVUX/MVVM is used, the default property value should be an ObservableCollection rather than just List, right?

Well, it really depends who is the "owner" of the collection. The 2 cases are like fore the Q2:

  1. If the owner is the "model" (could be MVUX, a VM of MVVM or even code-behind), you can even default the collection to null.
  2. If the collection is owned by your control, you could indeed use (or inherit from) ObservableCollectio…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@dr1rrb
Comment options

@kucint
Comment options

@kucint
Comment options

@dr1rrb
Comment options

Answer selected by kucint
@kucint
Comment options

@dr1rrb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants