按钮单击WPF时如何验证空文本框? [英] How to validation empty textbox when button click WPF?

查看:374
本文介绍了按钮单击WPF时如何验证空文本框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是wpf的新手,我想在用户点击按钮将数据存储到数据库时留下任何空文本框的错误消息进行验证

i需要简单的步骤才能做到这一点因为我花了我所有的时间3天寻找简单的代码与简单的例子,但我不明白

请任何人都可以轻松地帮助我,因为我是wpf的新手,或者任何人有想法离开文本框时显示错误空我需要它在VB中wpf而不是C#



我尝试了什么:



请允许任何人以简单的方式帮助我,因为我是wpf的新手,或者任何人都有想法在离开文本框时显示错误空我需要它在VB中wpf而不是C#

i'm new in wpf and i want to make validation with error message on any empty text box user left when he click button to store data to database
i need simple steps to do that because i spend all my time for 3 days searching for simple code with simple example but I did not understand it
Please can anyone help me in an easy way because I'm new in wpf or anyone has an idea to display error when leaving the text box Empty I need it in VB wpf not C#

What I have tried:

Please can anyone help me in an easy way because I'm new in wpf or anyone has an idea to display error when leaving the text box Empty I need it in VB wpf not C#

推荐答案

参见 WPF:初学者指南 - n的第1部分 [ ^ ]和以下文章,以及Sacha Barber的其他任何内容。
See WPF: A Beginner's Guide - Part 1 of n[^] and the following articles, plus anything else by Sacha Barber.


这篇关于按钮单击WPF时如何验证空文本框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆