没有合适的资源?快使用搜索试试~ 我知道了~
首页C#进阶:Pro WPF 4.5权威指南
C#进阶:Pro WPF 4.5权威指南
需积分: 9 5 下载量 96 浏览量
更新于2024-07-22
收藏 29.67MB PDF 举报
《Pro WPF 4.5 in C#》是一本由Matthew MacDonald编著的专业书籍,专为C#开发者量身打造,针对Windows Presentation Foundation (WPF) 4.5技术进行深入讲解。该书英文原版,印刷清晰,非扫描版本,因此拥有极高的质量和可读性,是教师推荐的学习资源,尤其适合希望提升在.NET框架下开发Windows应用程序技能的读者。
本书全面覆盖了WPF 4.5的新特性和功能,包括但不限于用户界面设计、数据绑定、控件使用、动画和多媒体集成、MVVM(Model-View-ViewModel)架构模式等核心概念。作者以清晰易懂的方式,结合实际项目案例,帮助读者理解并掌握如何高效地利用C#编程语言与WPF库来构建高性能、响应式的现代Windows应用。
WPF 4.5作为Microsoft .NET Framework的一部分,提供了一种强大的图形用户界面(GUI)开发工具,允许开发者创建复杂的交互式界面,其设计原则是分离关注点和可重用组件。C#作为.NET平台的主要编程语言,其面向对象特性、类型系统和LINQ查询语言在这里得到了充分运用,使得开发者能够编写更加简洁和高效的代码。
书中可能还涉及了WPF 4.5对矢量图形、3D图形、触控输入的支持,以及与XAML(XML为基础的标记语言)的深度整合,这些都是现代GUI设计的重要组成部分。此外,作者还会介绍如何处理性能优化,如数据绑定的效率提升、依赖注入和单元测试的最佳实践,以确保软件的稳定性和可维护性。
对于那些希望深入学习WPF和C#技术的专业人士或学生来说,《Pro WPF 4.5 in C#》无疑是一本不可或缺的参考书籍。通过阅读这本书,读者不仅可以获得理论知识,还能通过实际项目的指导,提高自己的编程能力和解决实际问题的能力。同时,由于版权保护严格,任何复制或传播必须遵守版权法相关规定,获取许可后方可合法操作。
xv
■
C
ONTENT
S
Easing In and Easing
O
u
t
............................................................................................................................
419
Easing Function
C
lasses
.............................................................................................................................
420
C
reating a
C
ustom Easing Functio
n
............................................................................................................
423
An
i
mat
i
on Per
f
ormanc
e
......................................................................................................
42
5
Desired Frame Rat
e
....................................................................................................................................425
Bitmap Caching ..........................................................................................................................................428
The Last Wor
d
.....................................................................................................................430
C
hapter 16: Advanced Animatio
n
.....................................................................................
431
Animation T
y
pes Revisited..................................................................................................
4
31
Animatin
g
Transform
s
.................................................................................................................................4
3
2
Animatin
g
Brushe
s
.
....................................................................................................................................4
3
7
Animating Pixel Shader
s
.............................................................................................................................44
0
Ke
y
-Frame Animatio
n
.........................................................................................................
442
Discrete Ke
y
-Frame Animations ................................................................................................................
.
44
3
Easing Ke
y
Frames
.
...................................................................................................................................
.
444
Spline Ke
y
-Frame Animations ...................................................................................................................
.
444
Path-Based An
i
mat
i
o
n
........................................................................................................
446
Fr
a
m
e
-B
ased
Anim
a
ti
o
n.....................................................................................................
4
4
8
Stor
y
boards in Code ..........................................................................................................
.
45
2
Creatin
g
the Main Windo
w
..........................................................................................................................4
53
Creatin
g
the Bomb User Contro
l
................................................................................................................
.
454
Dropp
i
n
g
the Bomb
s
..................................................................................................................................
.
455
Intercept
i
n
g
a Bom
b
..................................................................................................................................
.
45
8
Countin
g
Bombs and Cleanin
g
U
p
.............................................................................................................
.
4
60
Th
e
L
as
t W
o
r
d
.
....................................................................................................................
46
2
Part IV: Templates and Custom Elements.........................................................................
463
Chapter 17: Control Template
s
..........................................................................................
46
5
Understandin
g
Lo
g
ical Trees and Visual Tree
s
....................................................................
46
5
Understanding Template
s
...................................................................................................
4
71
Th
e
C
hr
o
m
e
C
l
asses
...................................................................................................................................47
3
Dissectin
g
Controls
.
....................................................................................................................................47
4
Creating Control Templates
.
...............................................................................................
4
77
A Sim
p
le Butto
n
..........................................................................................................................................47
8
Template Bindin
gs
......................................................................................................................................47
9
Tri
gg
ers That Chan
g
e Propertie
s
...............................................................................................................
.
4
8
1
■ CONTENT
S
xvi
Tr
i
ggers That Use An
i
mat
i
on
.......................................................................................................................
484
Organizing Template Resource
s
.........................................................................................
48
5
Refactoring the Button Control Templat
e
....................................................................................................
486
Appl
y
ing Templates with St
y
les .................................................................................................................
.
488
Appl
y
ing Templates Automaticall
y
.............................................................................................................
.
490
Working with User-Selected Skins ............................................................................................................
.
491
Building More Complex Template
s
.
....................................................................................493
Nested Templates .......................................................................................................................................494
Modif
y
ing the Scrollba
r
..............................................................................................................................496
Exploring the Control Template Example
s
..................................................................................................501
Visual States
.......................................................................................................................
503
The Last Wor
d
.....................................................................................................................504
C
hapter 18:
C
ustom Element
s
...........................................................................................
5
0
5
Understandin
g
Custom Elements in WP
F
.
..........................................................................
506
Building a Basic User
C
ontro
l
.
............................................................................................5
08
De
fi
n
i
ng Dependenc
y
Propert
i
e
s
................................................................................................................
5
09
De
fi
n
i
ng Routed Event
s
..............................................................................................................................
5
12
Add
i
ng Markup
...........................................................................................................................................
51
3
Usin
g
the Control
........................................................................................................................................
5
1
5
Supportin
g
Command
s
...............................................................................................................................
5
1
6
Taking a Closer Look at User Control
s
........................................................................................................
51
8
Creating a Lookless Control
.
..............................................................................................
.
5
20
Refactorin
g
the Color Picker Cod
e
.............................................................................................................
.
52
0
Refactorin
g
the Color Picker Marku
p
..........................................................................................................52
0
Streamlinin
g
the Control Templat
e
............................................................................................................
.
524
Supporting Visual States
.
..................................................................................................
.
5
27
Starting the FlipPanel Class .......................................................................................................................
.
52
8
Choosing Parts and States ........................................................................................................................
.
53
0
The Default Control Tem
p
lat
e
.....................................................................................................................
53
2
Usin
g
the FlipPanel
.
....................................................................................................................................5
38
Usin
g
a Different Control Templat
e
............................................................................................................
.
539
Creating Custom Panels .....................................................................................................
5
4
0
The Two-Step La
y
out Process ....................................................................................................................541
Th
e
Ca
nv
as
C
l
o
n
e
.......................................................................................................................................
5
44
A Better Wrappin
g
Pane
l
.............................................................................................................................545
Custom-Drawn Elements...................................................................................................
.
5
48
xvii
■
C
ONTENT
S
The
O
nRender() Metho
d
..............................................................................................................................
548
Evaluating
C
ustom Drawin
g
.......................................................................................................................
55
0
C
reating a
C
ustom-Drawn Elemen
t
............................................................................................................
55
1
Creating a Custom Decorator ....................................................................................................................
.
55
3
The Last Wor
d
.
....................................................................................................................554
Part V: Data........................................................................................................................555
C
hapter 19: Data Bindin
g
..................................................................................................557
Binding to a Database with
C
ustom
O
bject
s
.
.....................................................................
557
Buildin
g
a Data Access Componen
t
...........................................................................................................
.
558
Buildin
g
a Data Ob
j
ec
t
................................................................................................................................
56
1
Displa
y
ing the Bound Objec
t
......................................................................................................................
.
56
2
Updating the Databas
e
...............................................................................................................................
5
64
C
hange Notificatio
n
....................................................................................................................................5
6
5
Bindin
g
to a Collection of Ob
j
ect
s
......................................................................................5
66
Displa
y
ing and Editing Collection Item
s
.....................................................................................................5
6
7
Inserting and Removing Collection Item
s
..................................................................................................
.
572
Binding to the ADO.NET Object
s
.................................................................................................................
572
Binding to a LINQ Expressio
n
......................................................................................................................
574
Improvin
g
Performance in Lon
g
List
s
.................................................................................
5
7
6
Virt
ua
liz
a
ti
o
n
.
..............................................................................................................................................
5
7
6
Item Container Rec
y
clin
g
............................................................................................................................
5
7
8
Cache Lengt
h
..............................................................................................................................................
57
8
Deferred Scrolling......................................................................................................................................
.
57
9
Validation...........................................................................................................................
.
57
9
Validation in the Data Objec
t
......................................................................................................................
580
C
ustom Validation Rules .............................................................................................................................
58
5
Reactin
g
to Validation Error
s
......................................................................................................................5
8
7
Gettin
g
a List of Error
s
................................................................................................................................
588
Showing a DifferenError Indicato
r
.............................................................................................................
.
5
89
Validating Multiple Value
s
...........................................................................................................................5
92
D
a
t
a
Pr
o
vi
de
r
s
...................................................................................................................
.
595
The ObjectDataProvider ..............................................................................................................................
596
The XmlDataProvider..................................................................................................................................5
98
Th
e
L
as
t W
o
r
d
.....................................................................................................................
600
C
hapter 20: Formatting Bound Dat
a
.................................................................................
601
Data Bindin
g
Redu
x
.
...........................................................................................................601
■ CONTENT
S
xviii
Data
C
onversion
.................................................................................................................
603
Using the StringFormat Propert
y
...............................................................................................................
.
603
Introducing Value Converter
s
.....................................................................................................................
.
60
5
Formatting Strings with a Value Converte
r
................................................................................................
.
605
Creating Objects with a Value Converte
r
....................................................................................................608
Appl
y
ing Conditional Formattin
g
...............................................................................................................
.
610
Evaluating Multiple Propertie
s
...................................................................................................................
.
6
12
List
C
ontrols .......................................................................................................................
613
List St
y
les...........................................................................................................................615
The ItemContainerSt
y
le ..............................................................................................................................
61
5
A Li
s
tB
o
x with
C
h
ec
k B
o
x
es
o
r R
ad
i
o
B
u
tt
o
n
s
...........................................................................................
.
6
17
Alternating Item St
y
l
e
................................................................................................................................
.
620
S
t
y
le
S
electors...........................................................................................................................................
.
622
Data Tem
p
lates
...................................................................................................................
6
2
5
S
eparating and Reusing Template
s
............................................................................................................
628
Us
i
ng More Advanced Template
s
................................................................................................................
629
Var
yi
ng Template
s
......................................................................................................................................
632
Template
S
electors
.....................................................................................................................................
633
Templates and Selection
............................................................................................................................
636
Changing Item La
y
ou
t
.................................................................................................................................
6
41
The
C
omboBox ...................................................................................................................
6
4
2
Th
e
L
as
t W
o
r
d
.....................................................................................................................
6
4
5
C
hapter 21: Data View
s
.....................................................................................................
6
47
The View
O
bjec
t
..................................................................................................................
64
7
Retrieving a View
O
bject .............................................................................................................................
648
Nav
i
gat
i
ng w
i
th a V
i
ew ...............................................................................................................................
648
Creating a View Declarativel
y
....................................................................................................................
.
6
5
1
Filtering,
S
orting, and
G
rouping
.
.........................................................................................
6
5
3
Filtering Collections....................................................................................................................................
653
F
i
lter
i
ng the DataTable................................................................................................................................
6
5
6
Sorting ........................................................................................................................................................
6
57
Groupin
g
.....................................................................................................................................................
6
5
8
Live Shaping ...............................................................................................................................................
663
The Last Wor
d
.....................................................................................................................
66
4
Chapter 22: Lists, Trees, and Grid
s
.
..................................................................................665
The ListView
.......................................................................................................................
66
5
x
ix
■
C
ONTENT
S
C
reating
C
olumns with the
G
ridVie
w
..........................................................................................................
666
C
reating a
C
ustom Vie
w
..............................................................................................................................
6
7
0
The TreeV
i
ew
......................................................................................................................
6
7
8
Creating a Data-Bound TreeVie
w
...............................................................................................................
.
679
Binding a DataSet to a TreeVie
w
................................................................................................................
.
682
J
ust-in-Time Node Creation.......................................................................................................................
.
68
3
The DataGrid.......................................................................................................................686
Resizing and Rearranging Column
s
...........................................................................................................
.
688
Defining Column
s
.......................................................................................................................................
6
8
9
Formatting and St
y
ling Column
s
................................................................................................................694
Formatt
i
ng Row
s
........................................................................................................................................
6
9
6
D
i
spla
yi
ng Row Deta
i
ls...............................................................................................................................698
Freezin
g
Columns.......................................................................................................................................
699
S
election....................................................................................................................................................
.
7
00
Sorting
........................................................................................................................................................
7
00
Ed
i
t
i
n
g
.........................................................................................................................................................
7
00
The Last Wor
d
.
....................................................................................................................7
03
Part VI: Windows, Pa
g
es, and Rich Controls
.
...................................................................7
0
5
Cha
p
ter 23: Windows ........................................................................................................7
0
7
Th
e
Win
do
w
C
l
ass
.............................................................................................................
.
7
0
7
Showing a Windo
w
.....................................................................................................................................
7
09
Pos
i
t
i
on
i
ng a W
i
ndow
.................................................................................................................................
71
0
Saving and Restoring Window Locatio
n
.....................................................................................................71
1
Window Interaction
.
..........................................................................................................
.
7
13
Window Ownership
.
...................................................................................................................................
.
71
5
The D
i
alo
g
Model
.
......................................................................................................................................
.
71
5
Common Dialo
g
Boxes................................................................................................................................71
6
Nonrectangular Window
s
..................................................................................................
.
717
A Simple Shaped Windo
w
...........................................................................................................................7
1
7
A Trans
p
arent Window with Sha
p
ed Conten
t
.............................................................................................
.
72
1
Movin
g
Shaped Windows ...........................................................................................................................72
3
Resizing Shaped Windows ..........................................................................................................................72
3
Puttin
g
It All To
g
ether: A Custom Control Template for Windows ................................................................725
Programming the Windows Taskba
r
.
..................................................................................72
8
Usin
g
Jump Lists ........................................................................................................................................72
9
Chan
g
in
g
the Taskbar Icon and Previe
w
.....................................................................................................734
剩余1091页未读,继续阅读
2018-08-02 上传
2013-03-18 上传
2018-12-01 上传
2019-01-25 上传
2015-12-17 上传
2018-09-17 上传
259 浏览量
2017-10-02 上传
150 浏览量
baidu_21841043
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Haskell编写的C-Minus编译器针对TM架构实现
- 水电模拟工具HydroElectric开发使用Matlab
- Vue与antd结合的后台管理系统分模块打包技术解析
- 微信小游戏开发新框架:SFramework_LayaAir
- AFO算法与GA/PSO在多式联运路径优化中的应用研究
- MapleLeaflet:Ruby中构建Leaflet.js地图的简易工具
- FontForge安装包下载指南
- 个人博客系统开发:设计、安全与管理功能解析
- SmartWiki-AmazeUI风格:自定义Markdown Wiki系统
- USB虚拟串口驱动助力刻字机高效运行
- 加拿大早期种子投资通用条款清单详解
- SSM与Layui结合的汽车租赁系统
- 探索混沌与精英引导结合的鲸鱼优化算法
- Scala教程详解:代码实例与实践操作指南
- Rails 4.0+ 资产管道集成 Handlebars.js 实例解析
- Python实现Spark计算矩阵向量的余弦相似度
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功