Menu
  • HOME
  • TAGS

INotifyDataErrorInfo is ignored when opening a window with an user control a second time

c#,wpf,xaml,inotifydataerrorinfo

Solution: Add x:Shared="False" as shown below: I have tested the fix and it's working as expected. <Window.Resources> <layoutBreakerMinimal:View x:Key="OneInstanceView" x:Shared="False" /> </Window.Resources> When x:Shared="False", modifies WPF resource-retrieval behavior so that requests for the attributed resource create a new instance for each request instead of sharing the same instance for all...

How to implement INotifyDataErrorInfo for Datarow

silverlight,inotifydataerrorinfo

//This is your row... more or less. public class GridData : DynamicObject, INotifyDataErrorInfo { private Dictionary<string, object> _propertyValues = new Dictionary<string, object>(); //this object holds your errors. private Dictionary<string, List<ValidationResult>> _errorsContainer = new Dictionary<string, List<ValidationResult>>(); //when this fires it notifies the UI the errors of this object have changed. public...