WPF中触发器的学习
WPF中触发器的学习 WPF中的触发器可以用来设置控件的状态变化的时候发生的一些事情。 本案例说明的时先定义一个资源,类型是按钮类型,添加一个出发的事件是 鼠标悬停 时字体大小变成30,字体变成蓝色 < Window x: Class = " notes00.MainWindow " xmlns = " http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns: x = " http://schemas.microsoft.com/winfx/2006/xaml " xmlns: d = " http://schemas.microsoft.com/expression/blend/2008 " xmlns: mc = " http://schemas.openxmlformats.org/markup-compatibility/2006 " xmlns: local = " clr-namespace:notes00 " mc: Ignorable = " d " xmlns: control = " clr-namespace:MyControl;assembly=MyControl " Title = " MainWindow " Height = " 400 " Width = " 400 "