`
文章列表
Resources and Styles   从下图,我们可以看到资源的应用场景(具体细节见扩展文章): 由'Normal'与'Large'改变字体尺寸大小   Defining Resources ResourceDictionary,this class type stores reusable “pieces” of an application,Some of the most common reusable pieces are colors and brushes used to create an application’s color theme.  Resou ...
Presenters and Views-the Shell Infrastructure   two levels presenter: control level,application level; An application presenter is responsible for managing items that have application-wide scope. This could be state that is accessed or manipulated by various parts of the application, or it co ...
A Contact Manager   Choosing an Architecture-interactive application MVC- Model objects represent the business concerns that are specific to the application being built; Views are the actual visible components of an application; Controllers traditionally functioned as mediators between the h ...
output     WPF Document Controls DocumentPageView Displays a single page using a DocumentPaginator. DocumentViewer Displays a FixedDocument with a rich set of controlsfor document navigation, printing, zooming,search, and so on. FlowDocumentReader Displays a FlowDocument with the capa ...
路由事件浏览 (1)在vs designer中,如在窗口中增加一个按钮,命名为MyButton,双击它,那么 它的xaml声明<Button Name="myButton" Click="myButton_Click">Click Me</Button>会在指明事件处理程序的那个对象上,直接产生一个健全的事件挂钩;   (2)这可以通过观察以下文件来验证: class constructor-右击InitializeComponent方法-Go To Definition-生成的代码文件(.i.g.cs)-Connect方 ...
Commands In WPF, a command is a function or action(f.e,making the selected text bold) that can be bound to an input gesture(user actions,some way that a user provides input to an application,the gestures are all routed events).   four central concepts underlying commands: The command itself is th ...
events handle   routed event: UIElement(all elements inherits from);bubble(冒泡,up to root element),tunnel(隧道,down from root element); void Handle_RoutedEvent(object sender, RoutedEventArgs e) RoutedEventArgs derives from EventArgs,includes extra information that WPF uses to work its magic;   Pr ...
A real-world program   basic application layout   <Window x:Class="TextEditor.MainWindow"                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"                Title=&qu ...
Application   deployable file formats: (1)Standard Executable; (2)XAML Browser Application(xbap,not sl-related,simple deployment approach); xbap程序相较于wpf应用程序,window1.xaml替换为page1.xaml,另外,扩展名为.pfx的文件用于clickonce部署; (3)pure XAML file; (纯粹的xaml无代码文件的功能已经很强,可在kaxaml中运行见效果 附件1;xbap运行 附件2)   wpf ...
Data Binding   markup extensions(quotation marks are not allowed)-{Binding ..}(wpf属性系统的重要标志!) <TextBlock Text=”{Binding ElementName=SampleText, Path=Text}”                  FontFamily=”{Binding ElementName=FontList,                  Path=SelectedItem}”                  FontSize=”10”             ...
basic Control   Control base class derives from FrameWorkElement base class; (property-TabIndex)     Text: TextBlock,Label,TextBox for input;(property-AcceptsReturn,AcceptsTab,SpellCheck.IsEnabled,ToolTip)    FocusManager.FocusedElement=”{Binding ElementName=firstName}”   <Label Content ...
Layout   Panel,Decorator; System.Windows.Controls.Control; System.Windows.FrameworkElement; (VerticalAlignment, HorizontalAlignment, and Margin property)      DockPanel has intutive "intelligence"-dynamic layout mechanism DockPanel,commonly root layout control; DockPanel.Dock-atta ...
wpf项目文件 vs->新项目->wpf应用程序; App.xaml文件,程序本身,不可视,保存整个程序用到的资源,以及运行时启动哪个窗口(startupUri); Window.xaml文件,程序主窗口,程序所有的可视元素和程序行为; App.xaml.cs/Window.xaml.cs文件,页后代码文件; DockPanel,StackPanel标签,用于布局(layout);     TextBox用于接受用户输入,TextBlock用于显示.   小结: Panel使用pixel unit表示屏幕位置(hard screen position).  
XAML,既然用户控件是一个大类,那么干脆对这个集合进行统一的编程模式,这就是xaml的原义。同时xaml的attribute programming是微软倡导式编程革命,enjoy this!   xmlns是xml形式的namespace,用于引入名字空间。见下例:   <Page xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”                xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”>        ...
WPF是微软.net的UI 架构,也是非常重要的框架。 --以下来自<Teach yourself WPF in 24 hours>,包括前16章的摘要.由于时间所限,不可能一一翻译,准确起见,列出本书的英文摘要,请自行理解。 我们关注两点:一是wpf的机制,二是它的语法实现。 本系列中引入了MVP模式,注意MVP模式与三层架构的区别。 wpf特征   数据切割-data cutter (object oriented), 可声明式ui(declarative); 智能化布局(layout); 可扩展矢量图形(svg,graphics); 模板支持(两类); ...
Global site tag (gtag.js) - Google Analytics