The Last Word
In this chapter, you took a quick look at the WPF application model. To manage a simple WPF
application, you need to do nothing more than create an instance of the Application class and
call the Run() method. However, most applications go further and derive a custom class from
the Application class. And as you saw, this custom class is an ideal tool for handling application
events and an ideal place to track the windows in your application or implement a
single-instance pattern.
You haven??™t quite plumbed the full reaches of the Application class??”there??™s still a
Resources collection to consider, where you can define objects you want to reuse throughout
your application, like styles that can be applied to controls in multiple windows. However, it??™s
safe to leave these details to Chapter 11, when you explore the WPF resource model in more
detail. Instead, in the next chapter you??™ll consider how controls are organized into realistic
windows using the WPF layout panels.
CHAPTER 3 n THE APPLICATION 75
Layout
Half the battle in any user interface design is organizing the content in a way that??™s attractive,
practical, and flexible. But the real challenge is making sure that your layout can adapt itself
gracefully to different window sizes.
In WPF, you shape layout using different containers.
Pages:
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195