Answer the question
In order to leave comments, you need to log in
How to correctly solve CA2227:Collection properties should be read only for UserControl?
There is a usercontrol to display a collection in a listbox.
Here is the code snippet (using Fody.Bindables)
namespace UI.Controls.AdminSection.UsersPane
{
[AddINotifyPropertyChangedInterface]
public partial class ReferralsList : UserControl
{
public ReferralsList()
{
InitializeComponent();
}
[DependencyProperty]
public ObservableCollection<Referral> Referrals { get; set; } =
new ObservableCollection<Referral>();
}
}
<usersPane:ReferralsList
Referrals="{Binding ReferralsForSelectedUser}" />
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question