This is the first in a set of revision questions for WPF. This is modeled as a kind of Exercise section for Petzold’s “Application = Code + Markup” in that you’ll find answers or clues to the answers in the book. Without more ado here we go:
- What is meant by [STAThread] attribute?
- Name any three of the events of the Application object.(Hint: Startup,…
- What is shutdownmode? Name some of the values it can take (the names need not be precise) (Hint: OnMainWindowClose,…
- There can be only one Application object in a program. What static property can be used to access it? (Answer:Current)
- What is the parent class of an Application object?
- **Can an Application object contain (unattached) dependency objects?
- What is the resolution of a WPF window? If you set Height=960 what is the height of the window in inches?
- How would you position a window to occupy the top left corner of the screen window? (Hint: use SystemParameters)
- How would you trap a key down or key up event in a window?
- How would you handle text input, from a keyboard, in a window?
- How would you set the title of a window?
- What are some of border styles?
- What is the type of Window.Background? (hint: it is not color)
- What is WindowState? (Hint: WindowState.Maximized…)