Customizing Appearance by Using Windows® Presentation Foundation
2010-04-29 10:45
369 查看
Sharing Logical Resources in an Application
WPF enables you to separate common objects and resources so that you can reuse them across applications or isolate them for localization. You can reference resources in XAML or programmatically.
Creating Consistent User Interfaces by Using Styles
WPF enables you to define UIs that have a consistent look and feel by using styles and themes to share properties, resources, and event handlers.
Style:支持BasedOn(继承),也是一种Resource;Trigger,Setter等。为控件设置统一的样式。
Changing the Appearance of Controls by Using Templates
The WPF templating model enables you to modify the appearance and behaviors of content controls and item controls. You can use template binding to enable the user to change the values of certain control properties.
Enhancing User Interfaces by Using Triggers and Animations
WPF enables you to enhance the UI and create visually compelling effects by using triggers and animations to change an application's appearance based on user interactions.
WPF enables you to separate common objects and resources so that you can reuse them across applications or isolate them for localization. You can reference resources in XAML or programmatically.
Creating Consistent User Interfaces by Using Styles
WPF enables you to define UIs that have a consistent look and feel by using styles and themes to share properties, resources, and event handlers.
Style:支持BasedOn(继承),也是一种Resource;Trigger,Setter等。为控件设置统一的样式。
<Application.Resources> <Style TargetType="TextBox"> <Style.Triggers> <Trigger Property="IsReadOnly" Value="True"> <Setter Property="Background" Value="Red"></Setter> </Trigger> </Style.Triggers> <Style.Setters> <Setter Property="Foreground"> <Setter.Value> Yellow </Setter.Value> </Setter> <Setter Property="Text" Value="default value"> </Setter> </Style.Setters> </Style> <Style BasedOn="{StaticResource {x:Type TextBox}}" x:Key="MyTextBox" TargetType="TextBox"> <Style.Setters> <Setter Property="Foreground" Value="Red"></Setter> </Style.Setters> </Style> </Application.Resources>
Changing the Appearance of Controls by Using Templates
The WPF templating model enables you to modify the appearance and behaviors of content controls and item controls. You can use template binding to enable the user to change the values of certain control properties.
Enhancing User Interfaces by Using Triggers and Animations
WPF enables you to enhance the UI and create visually compelling effects by using triggers and animations to change an application's appearance based on user interactions.
相关文章推荐
- Binding Data to Collections by Using Windows® Presentation Foundation
- Adding 3-D Graphics and Multimedia by Using Windows® Presentation Foundation
- Building User Interfaces by Using Windows® Presentation Foundation
- Binding Data to Controls by Using Windows® Presentation Foundation
- Writing Stereoscopic Software for StereoGraphics® Systems Using Microsoft Windows® OpenGL
- Writing Stereoscopic Software for StereoGraphics® Systems Using Microsoft Windows® OpenGL
- Deploy MSSQL2008R2 cluster and logshipping on Windows2008R2 cluster by using VBOX&StarWind
- windows error 1045 (28000) access denied for user 'root'@'localhost' (using password: YES)
- windows mysql提示:1045 access denied for user 'root'@'localhost' using password ye
- 【原创】Windows® Embedded CE 6.0 Fundamentals 读书笔记_Chapter 4
- 【原创】Windows® Embedded CE 6.0 Fundamentals 读书笔记_Chapter 7
- Is the Quartus® II software compatible with Microsoft Windows XP SP2
- 【原创】Windows® Embedded CE 6.0 Fundamentals 读书笔记_Chapter 8
- Oracle® Fusion Middleware Using Web Server Plug-Ins with Oracle WebLogic Server 11g Release 1 (10.3.
- Microsoft Windows® 2000的加密服务提供程序(CSP, Cryptographic Service Provider)
- 代号为 Windows® Server 2008 Beta 3
- [乐意黎原创] window.close()提示 "Scripts may close only the windows that were opened by it"
- (Windows® 2000 Server 专业参考)
- Speech SDK 5.1 for Windows® applications
- Generating Multivariate Normal Data by Using PROC IML & R