Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

16. WPF Controls > The Window

The Window

One very important, and slightly odd, content control is the Window. How is it odd? Glad you asked. The Window is odd because it’s the only control that can’t be hosted inside another control. That makes sense if you think about how UIs work (how could you put a Window inside a Button?) but it does violate strict OOP since it adds restrictions that don’t exist in the parent (ContentControl).

image

Put on Your Thinking Hat

image

Here’s a real challenge for you. Can you create the little application shown below? This is a pretty typical programming situation: You know what you need to do, and you know it’s possible, but you’re not entirely sure how to go about it. So you look at the objects, examine their properties and methods, maybe check around for some sample code somewhere. (Looking at sample code isn’t cheating. Every programmer I know looks at sample code A LOT. That’s why there are so many programming “cookbooks” on the market.)


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint