摘要:
在WPF中使用Button有时候需要让button响应鼠标的几种状态,虽然它本身也有响应的处理,但有时希望在它上面贴图片,在几种状态时可以随状态切换图片。此处用的是资源字典类似: 1 <Style x:Key="ButtonStyle34" TargetType="{x:Type Button}"> 2 <Setter Property="Template"> 3 <Setter.Value> 4 <ControlTemplate TargetType="{x:Type Button 阅读全文
posted @ 2011-07-21 11:52
帕拉美
阅读(19262)
评论(3)
推荐(1)
摘要:
使用WPF开发,Messenger.Default.Send()是非常适合不同View之间的控件交互,尤其是在MVVM模式下非常有用。贴一个demo记录下,省得以后忘记。只是demo,只是demo。要想使用这个功能,需要在引用里加上头文件 using GalaSoft.MvvmLight.Messaging;和GalaSoft.MvvmLight.WPF4.dll 这个库;namespace WpfApplication73{ /// <summary> /// MainWindow.xaml 的交互逻辑 /// </summary> public partial cl 阅读全文
posted @ 2011-07-21 11:00
帕拉美
阅读(4699)
评论(0)
推荐(0)
浙公网安备 33010602011771号