KimhillZhang  
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页

2012年3月27日

摘要: 定义一个ImageConverter,该类继续于IValueConverter这里使用ImageConverter把图片字符串的形式转成BitmapImage对象代码如下:[ValueConversion(typeof(string), typeof(BitmapImage))] public class ImageConverter : IValueConverter { /// <summary> /// 把对象转换为WPF程序中绑定目标(即控件的某个属性)可以使用的类型数据 /// </summary> /// <param name="value 阅读全文
posted @ 2012-03-27 14:09 KimhillZhang 阅读(1985) 评论(1) 推荐(1)

2012年3月26日

摘要: 1、XAML:<TextBox Name="textbox1"></TextBox>cs: public class Customer { public string Name { get;set;} } Customer customer = new Customer() { Name = "Zhangjinshan" }; Binding bind = new Binding(); bind.Source = customer; bind.Path = new PropertyPath("Name"); t 阅读全文
posted @ 2012-03-26 09:32 KimhillZhang 阅读(840) 评论(0) 推荐(0)

2012年3月23日

摘要: <Window.Resources> <Style x:Key="button"> <Setter Property="Button.FontSize" Value="30"/> </Style> </Window.Resources> <StackPanel> <Button Style="{StaticResource ResourceKey=button}" Content="HELLO"></But 阅读全文
posted @ 2012-03-23 23:03 KimhillZhang 阅读(508) 评论(0) 推荐(0)

2012年3月22日

摘要: 转:http://www.webtiro.com/304.html这里把自己觉得比较常用的挑出来:1.Ext.getvar el = Ext.get('myElementId');//获取元素,等同于document.getElementById('myElementId');//会缓存2. Ext.flyvar el = Ext.fly('myElementId')//不需要缓存。注:享元模式(Flyweight Design Pattern)是一种节省内存的模式,该模式的大概原理是建立单个全体对象然后不断反复使用它。二、CSS元素4.addC 阅读全文
posted @ 2012-03-22 19:25 KimhillZhang 阅读(1649) 评论(2) 推荐(0)
 
摘要: 用MVC内的return Json()返回到success与failure..弄了好久,,才弄出来。schoolform.getForm().submit({ clearValidation: true, waitMsg: '正在提交请稍后...', url: '/#/#, success: function (form, action) { }, failure: function (form, action) { }})return Json(new { success = true}, JsonRequestBehavior.AllowGet);这样就可以执行到s 阅读全文
posted @ 2012-03-22 11:47 KimhillZhang 阅读(3793) 评论(0) 推荐(0)

2012年3月21日

摘要: 网上找了好多EXTJS上传图片预览的,但都不行,,,下面虽然IE8可以但肯定还存在其它浏览器的兼容性问题,待搁应付一下吧。。{ width: 450, fileUpload: true, fieldLabel: '选择图片', items: [{ xtype: 'textfield', id: 'up_forth', name: 'up_forth', inputType: 'file', width: 300 }]}预览box{ columnWidth: .18, bodyStyle: ' margin: 阅读全文
posted @ 2012-03-21 17:25 KimhillZhang 阅读(2280) 评论(0) 推荐(2)

2012年3月20日

摘要: 当需要为ComboBox加载数据后进行赋初始选中项的话,如果是写在store.load()之后如:editCityStore.load({ params: { provinceID: proid });Ext.getCmp('city-id-name').setValue(cityid);由于是store是异步加载的,所以他会先赋值再填充值到ComboBox,,这里就需要用:当加载完成后再进行赋值 :editCityStore.load({ params: { provinceID: proid }, callback: function () { //等待数据加载完成才进行赋 阅读全文
posted @ 2012-03-20 13:21 KimhillZhang 阅读(1564) 评论(0) 推荐(1)
 
摘要: 获取窗体上面所有CheckBox选中的Content值。xaml:<StackPanel> <CheckBox Content="a" IsChecked="True"/> <CheckBox Content="b"/> <CheckBox Content="c" IsChecked="True"/> <CheckBox Content="d"/> <CheckBox Content="e" 阅读全文
posted @ 2012-03-20 08:42 KimhillZhang 阅读(2146) 评论(3) 推荐(0)

2012年3月19日

摘要: 抄些常用工具方便查找----------字符串Ext.util.Format.capitalize(string str);//将首字母变大写Ext.util.Format.ellipsis(string value, Number length);//截取指定length字符,将自动在尾处添加省略号'...'Ext.util.Format.htmlEncode(string value); //将文本编码lowercase(string value);//变小写stripScripts(Mixed value);//删除所有的Script标签stripTags(Mixed v 阅读全文
posted @ 2012-03-19 23:07 KimhillZhang 阅读(2212) 评论(0) 推荐(0)
 
摘要: 当通过用menu嵌套ComboBox时,一:combobox下拉会被隐藏,二:当选择一个时把MENU给隐藏了。网上找了解决办法: http://www.iteye.com/topic/441476当两个ComboBox做级联时,如果只是写:proCombox.on("select", function (proCombo) { var proId = proCombo.getValue(); Ext.getCmp("cityCombo-id").setValue("请选择..."); cityStore.load({ params: 阅读全文
posted @ 2012-03-19 13:34 KimhillZhang 阅读(681) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页