c# - How to set property in IDataErrorInfo validator from Xaml -
When using the IDataErrorInfo in WPA, there is a way to pass the parameter to the validator. For example, I have a compensation date picture, if valid for a new job, I want to restrict the date of permission for today or later, but when I need to allow date before the date for editing , Because no work can be edited, which has been done before.
My date picture in Xaml (.Net 4.0)
& lt; Date picture selectedData = "{Binding Path = Selected Issue.Issadet, Valid Ondaator Errs = True}" />
My IErrorDataInfo
Namespace OITaskManager.Model {Public partial class problem: IDataErrorInfo {// I want to make these values public from Xaml DateTime minDate = New date time (200 9, 1, 1); Public Date Time Maximum Date = New Date Time (2025, 12, 31); Public String This [String columnName] {Receive (if the column name == "is issued") {If IssDueDate & lt; minDate || IssDueDate & gt; maxDate) {Return "Due Date" + minDate.Date + " Should be later than "+ before MaxDate.Date; } Return tap; } Return tap; }}
You can simply use it on binding. Or you can maintain an IsNew internal position on the object object until it is considered new now.
Comments
Post a Comment