在好例子网,分享、交流、成长!
您当前所在位置:首页C# 开发实例桌面应用界面/GUI → WPF - Windows Presentation Foundation 4.5 Cookbook

WPF - Windows Presentation Foundation 4.5 Cookbook

桌面应用界面/GUI

下载此实例
  • 开发语言:C#
  • 实例大小:5.68M
  • 下载次数:15
  • 浏览次数:165
  • 发布时间:2022-12-23
  • 实例类别:桌面应用界面/GUI
  • 发 布 人:ZSPINGGG
  • 文件格式:.pdf
  • 所需积分:2

实例介绍

【实例简介】WPF - Windows Presentation Foundation 4.5 Cookbook

【实例截图】

【核心代码】

Table of Contents
Preface 1
Chapter 1: Foundations 7
Introduction 7
Creating custom type instances in XAML 9
Creating a dependency property 15
Using an attached property 25
Creating an attached property 28
Accessing a static property from XAML 33
Creating a custom markup extension 37
Handling routed events 44
Chapter 2: Resources 51
Introduction 51
Using logical resources 52
Dynamically binding to a logical resource 57
Using user-selected colors and fonts 59
Using binary resources 63
Accessing binary resources in code 70
Accessing binary resources from another assembly 72
Managing logical resources 76
Chapter 3: Layout and Panels 81
Introduction 81
Creating a table-like user interface 83
Dynamically sizing grid rows/columns 90
Creating a scrollable user interface 92
Creating a border around panels and elements 94
Placing elements in exact positions 96
Adding/removing elements to a panel dynamically 98
Creating a tabbed user interface 100
Implementing drag-and-drop 103
This material is copyright and is licensed for the sole use by on 2nd October 2012
ii
Table of Contents
Chapter 4: Using Standard Controls 109
Introduction 109
Working with text 110
Using content controls 114
Displaying images 120
Creating tooltips 126
Creating a list of items 131
Creating a standard menu 134
Creating a context menu 137
Selecting options with checkboxes and radio buttons 139
Manipulating tab order and focus 141
Chapter 5: Application and Windows 145
Introduction 145
Creating a window 145
Creating a dialog box 149
Using the common dialog boxes 153
Creating ownership between windows 156
Creating a custom shaped window 158
Creating a single instance application 162
Handling an unhandled exception 166
Chapter 6: Data Binding 169
Introduction 169
Element to element binding 170
Binding to a single object 173
Binding to a collection 180
Using data templates 184
Using value converters 191
Creating a master-detail view 199
Sorting and filtering bound collections 202
Grouping bound collections 209
Binding to multiple properties 214
Binding hierarchical data to a TreeView 217
Presenting data in a grid 220
Validating data 228
Chapter 7: Commands and MVVM 237
Introduction 237
Using routed commands 238
Implementing a basic MVVM application 246
Building a simple MVVM framework 254
This material is copyright and is licensed for the sole use by on 2nd October 2012
iii
Table of Contents
Building a complete MVVM style application 259
Creating an undo/redo system 276
Chapter 8: Styles, Triggers, and Control Templates 285
Introduction 285
Creating and using styles 286
Applying a style automatically 291
Creating a property trigger 295
Using data triggers 299
Creating an event trigger 302
Creating a multi trigger 304
Using behaviors 306
Replacing the control template of a progress bar 310
Replacing the control template of a scroll bar 317
Customizing selection in a Selector control 321
Chapter 9: Graphics and Animation 325
Introduction 325
Creating a custom shape 326
Applying transforms on elements 333
Manipulating a bitmap programmatically 336
Creating adorners 340
Creating property-based animations 344
Creating path-based animations 350
Creating custom animations 354
Adding animation easing to animations 359
Using custom effects with pixel shaders 363
Chapter 10: Custom Elements 369
Introduction 369
Creating a user control 370
Handling standard commands in a user control 381
Creating a custom (templated) control 384
Customizing a default template of custom control 396
Creating a custom panel 398
Creating a lightweight custom element 404
Chapter 11: Threading 409
Introduction 409
Updating the UI from a non-UI thread 410
Adding cancelation support 416
Using the BackgroundWorker component 419
This material is copyright and is licensed for the sole use by on 2nd October 2012
iv
Table of Contents
Adding cancelation and progress with BackgroundWorker 423
Using a timer to do periodic updates 428
Using C# 5.0 to perform asynchronous operations 430
Index 439

实例下载地址

WPF - Windows Presentation Foundation 4.5 Cookbook

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警