-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
For whom it may concern, if you use the CRUD control within other usercontrols (ui pages) that may get created several times, you may stumble across this problem: the Columns and SortingProperties dependency properties collections seem to "be set twice" (i.e., accumulate the values obtained from the data templates). This will turn the control unusable in such setting.
However, the fix is simple:
public GenericCrudControl()
{
SetValue(SortingPropertiesProperty, new ObservableCollection());
SetValue(ColumnsProperty, new ObservableCollection());
InitializeComponent();
}
I spent hours on this, until I stumbled upon:
https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/collection-type-dependency-properties
Nice work, although! :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels