문제

In a Windows form I've some controls and a UserControl. I've a ErrorProvider in the UserControl. I want to stop editing all the controls in the Form if there is an error in the userControl. Is there any way to do that?

I am using errorProvider.BindToCustomDataAndErrors(..)

도움이 되었습니까?

해결책

There is no any built-in way in Windows Forms that I'm aware of, to do something like that. I do believe you should implement it by yourself.

You can create an event like ErrorRecieved (say), and Disable controls in its handler.

EDIT

Here also a link to similar SO question.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top