Using WPF Validation rules and the disabling of a 'Save' button

前端 未结 10 2102
眼角桃花
眼角桃花 2020-11-28 09:54

I have a page where a few textboxes cannot be empty before clicking a Save button.


                            


        
10条回答
  •  不知归路
    2020-11-28 10:27

    You want to use Validation.HasError attached property.

    Along the same lines Josh Smith has an interesting read on Binding to (Validation.Errors)[0] without Creating Debug Spew.

提交回复
热议问题