
C#
freedom541
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
WPF智能输入提示
WPF智能输入提示是用一个textBox和Popup完成的,下面看具体代码: <Window x:Class="WPFPopup.ABCD" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"原创 2013-04-16 17:29:46 · 2120 阅读 · 1 评论 -
WPF,ListView设置分组
今天遇到一个问题,就是在ListView中设置分组。想了很久在网上早了些资料作出一个例子。 <ListView Height="224" HorizontalAlig原创 2013-04-22 15:58:30 · 4105 阅读 · 0 评论 -
<dxlc:LayoutGroup view="GroupBox"/>控件修改背景色
解决LayoutGroup控件背景色和标题背景色: <Window x:Class="WpfApplication2.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/原创 2013-04-15 13:39:34 · 9228 阅读 · 0 评论 -
Datagrid.Validating.Data(验证)
验证说起来也不复杂,在对应的列中添加和列名中的fileName一样">><local:YearValidationRule />xcdg:DataGridBindingInfo.ValidationRules> 这样的属性并在YearValidationRule中写相应的验证代码即可。本例中加入了验证改变背景色代码。 <Window x:Class="Datagrid.Validatin原创 2013-04-15 13:44:00 · 917 阅读 · 0 评论 -
Xceed DataGrid 中设置增加行的方法
废话不多说直接贴代码: <Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid" xmlns:local="clr-namespace:Xceed.Wpf.Documentation"> <xcdg:DataGridCollectionViewSource x:Key="cvs_persons"原创 2013-04-12 21:59:57 · 1197 阅读 · 0 评论 -
C#防SQL注入
本例主要完成查询时用户恶意输入sql语句破坏数据库的行为进行过滤和警告提示; 防SQL注入的类主要时根据输入的查询条件检查时候含有sql语句的成分并返回True或False,和一个属性message; 代码如下: public static class SQLCheckUtil { private static string _Message; public stat原创 2013-04-19 11:26:44 · 924 阅读 · 0 评论 -
表单验证(正则表达式)
表单验证是为了用户友好提示而设计的,当用户填写如身份证、IP、日期、电话等如果输入错误的则会提示。 不多说看代码: public static class ValidationStrUtil { //验证电话号码 public static bool isTelephone(string str) { return Regex.IsMatch(str, @原创 2013-04-19 11:29:14 · 518 阅读 · 0 评论