摘要:
基于数据模型--业务逻辑--界面逻辑--用户界面的以“数据驱动界面”结构和分层形式,WPF中的事件处理器(Event-Handler)功能只限于界面逻辑。标签的attributes除了一部分对应对象的property外,还有一部分是对应对象的事件,如<Button>标签的attributeclick就对应Button类的click事件。界面逻辑用于处理界面与用户的交互,事件处理函数被运行时调用。将逻辑代码隐藏在UI代码之后的行为称为代码后置(Code-behind). 这是由于.NET支持partial类,能将XAML代码与x:Class指定的类进行合并.XAML中注释:<! 阅读全文
posted @ 2012-11-29 17:44
ArcherDev
阅读(274)
评论(0)
推荐(0)
摘要:
以下内容摘自刘铁猛著的《深入浅出WPF》一书。<Window x:Class="WpfApplication1.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"Title="MainWindow" Height="350" Width="525">...& 阅读全文
posted @ 2012-11-29 16:26
ArcherDev
阅读(234)
评论(0)
推荐(0)
浙公网安备 33010602011771号