You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a viewmodel with observable list property. This property watches Model property. initial value of both is null and assigned later. Which is perfectly normal behavior in WPF for example.
But UnityWeld does't allow null for observable list. And I wonder why?
I see in code that CollectionBinding watches this property and rebind if necessary.
And it looks like redundant limitation.
Do I miss something? Can we just silently wait for value instead of exception?
I can implement that, but I realized that I did my previous PR in master, and all my work will go to that PR :) but you can cherry-pick this change...or may be you have an better idea...
var viewModelValue = viewModelCollectionProperty.GetValue(viewModel, null);
if (viewModelValue == null)
{
throw new PropertyNullException(
"Cannot bind to null property in view: "
+ ViewModelPropertyName
);
}
Thanks.
The text was updated successfully, but these errors were encountered:
TimGameDev
changed the title
CollectionBinding to unsigned property
CollectionBinding to unassigned property
Oct 9, 2019
Hey again,
I have a viewmodel with observable list property. This property watches Model property. initial value of both is null and assigned later. Which is perfectly normal behavior in WPF for example.
But UnityWeld does't allow null for observable list. And I wonder why?
I see in code that CollectionBinding watches this property and rebind if necessary.
And it looks like redundant limitation.
Do I miss something? Can we just silently wait for value instead of exception?
I can implement that, but I realized that I did my previous PR in master, and all my work will go to that PR :) but you can cherry-pick this change...or may be you have an better idea...
CollectionBinding.cs
line 141
Thanks.
The text was updated successfully, but these errors were encountered: