Deck 25: GUI With Windows Presentation Foundation

Full screen (f)
exit full mode
Question
WPF graphics are resolution-independent,meaning that they're designed to look similar on screens of different sizes.
Use Space or
up arrow
down arrow
to flip the card.
Question
A XAML document's root element is a ______

A) Window
B) Form
C) Grid
D) UserControl
Question
WPF GUIs can be created by dragging predefined controls from the Toolbox onto the design surface.
Question
XAML is similar toNET,a language that allows Internet apps to share data.
Question
_________ allows you to describe a WPF GUI without generating any C# code statements.

A) XML
B) Silverlight
C) XAML
D) vector graphics
Question
Every XAML document must define the presentation XAML namespace and the standard XAML namespace.
Question
XML elements can be nested,creating parent elements and child elements.
Question
XAML is used to define the app's ________.

A) program logic
B) graphical user interface
C) code behind classes
D) All of the above.
Question
XAML is used to describe the ___________ of a WPF app.

A) classes
B) program logic
C) code-behind file
D) GUI
Question
Using XAML gives WPF the benefit of raster-based graphics.
Question
The app's primary code-behind class has filename _______.

A) Application.xaml
B) Application.xaml.cs
C) Window1.xaml
D) Window1.xaml.cs
Question
A StackPanel has a vertical or horizontal flow,set by its _____ attribute.

A) Order
B) Orientation
C) FlowType
D) Direction
Question
WPF uses _________ graphics,which allows graphics to scale without losing quality.

A) bitmap
B) vector
C) raster-based
D) jpeg
Question
A content control can have text or several child elements.
Question
A key benefit of WPF is that it provides a single platform to handle GUI,images,animation 2D and 3D graphics,audio and video.
Question
A Grid is a type of layout container.
Question
The StartupUri attribute defines which XAML document loads first.
Question
A XAML document has exactly one ______

A) root element
B) start tag
C) end tag
D) child element
Question
XAML is a specialized vocabulary of ___________.

A) HTML
B) XML
C) ASP.NET
D) WPF
Question
One problem with using XAML is that GUI design is slightly integrated with programming.
Question
Layout of controls refers to the controls' _____.

A) size
B) event handlers
C) position
D) a and b
E) a and c
Question
The ________ property determines the amount of space around a control's edges.

A) Padding
B) Margin
C) Space
D) Edges
Question
The _______ property of an event stores a reference to the control that triggered the event.

A) Target
B) Source
C) SourceControl
D) EventTarget
Question
A WPF Grid control allows child elements to be positioned using explicit coordinates.
Question
Flow-based layouts allow the GUI to display correctly when the user resizes the window.
Question
How does the size setting Auto size the control

A) It uses the maximum possible size to fill the area
B) It uses a relative size
C) It uses the smallest possible size to fit its contents
D) a and b
Question
Use the ____________ method to programmatically close an app.

A) Application.Shutdown
B) Application.Exit
C) Application.Current.Exit
D) Application.Current.Shutdown
Question
A MouseMove event passes information using a MouseMoveEventArgs object.
Question
A layout container's ______ property stores a list of its child elements.

A) Children
B) ElementList
C) FlowItems
D) List
Question
A MouseLeftButtonDown event passes information using a MouseButtonEventArgs object.
Question
If a command is disabled,all methods of executing that command are disabled.
Question
A bubbling event travels down the container hierarchy,and a tunneling event travels up the container hierarchy.
Question
A MouseEventArgs object's GetPosition event always returns a position relative to the top left of the WPF window.
Question
A routed event is ignored after its Handled property is set to True.
Question
A shape can be given an absolute position in a Canvas using the Canvas's methods ________ and________.

A) SetX, SetY
B) SetLeft, SetTop
C) PositionX, PositionY
D) PadLeft, PadTop
Question
Events which can travel up or down the container hierarchy are called ______.

A) expandable events
B) sourced events
C) bubble events
D) routed events
Question
The CanExecute event for a command allows programmers to implement logic that determines whether a command should be enabled or disabled.
Question
WPF events which behave like Windows Forms events are called ______.

A) expandable events
B) tunneling events
C) bubbling events
D) direct events
Question
WPF provides the ability to create ____________,actions or tasks that may be triggered by many different user interactions.

A) multi-events
B) shared events
C) commands
D) b or c
Question
It's a good practice to use ranges for the size and relative location for the position of WPF controls.
Question
Static resources and dynamic resources differ because static resources are set at initialization time and dynamic resources can be modified by the app.
Question
The ItemsSource property of a ListView must refer to the name of a DataTemplate element.
Question
A WPF style is a set of that can be reused for any number of controls.

A) property-value definitions
B) event-handler definitions
C) background images
D) a and b.
Question
Keyword ________ is used for constants whose values cannot be determined at compile time.

A) const
B) readonly
C) static
D) None of the above.
Question
Resources are similar to private members.They're accessible only to the controls they're defined in.
Question
Use the ________ property to bind data to information in another XAML element,and the ________ property to bind to a specific property of that element.

A) Binding, Source
B) Target, Property
C) ElementName, Path
D) Target, Source
Question
Dependency properties provide built-in change notification.
Question
WPF styles require you to explicitly set the individual properties of each control.
Question
Data members declared as readonly must be initialized in their declaration.
Question
A routed command declared in the XAML changes a control's appearance when that control enters a certain state.
Question
WPF controls are 'lookless,' meaning that their appearance can be set by any control template.
Question
Colors are represented by three color values and the alpha value,specifying

A) brightness
B) opacity
C) a blending constant
D) None of the above.
Question
A CollectionViewSource provides multiple "views" of the same data.
Question
In addition to GUI appearance,styles can also contain event handlers.
Question
A control's Background property is a customizable ________ object.

A) Color
B) BackColor
C) GUIcolor
D) None of the above
Question
Which of the following is not a data provider for WPF data binding

A) ObjectDataProvider
B) SqlDataProvider
C) XmlDataProvider
D) None of the above.
Question
Setting the property to None removes the standard window frame containing the title and buttons to minimize,maximize and close the app.

A) Frame
B) Title
C) WindowStyle
D) WindowFrame
Question
WPF provides built-in functionality--such as minimizing,maximizing and closing the window--for custom windows.
Question
Custom control templates allow you to completely customize a control's appearance.
Question
The attribute declares the control modified by a control template.

A) Type
B) TargetType
C) TargetControl
D) Control
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/60
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 25: GUI With Windows Presentation Foundation
1
WPF graphics are resolution-independent,meaning that they're designed to look similar on screens of different sizes.
True
2
A XAML document's root element is a ______

A) Window
B) Form
C) Grid
D) UserControl
A
Window.
3
WPF GUIs can be created by dragging predefined controls from the Toolbox onto the design surface.
True
4
XAML is similar toNET,a language that allows Internet apps to share data.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
5
_________ allows you to describe a WPF GUI without generating any C# code statements.

A) XML
B) Silverlight
C) XAML
D) vector graphics
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
6
Every XAML document must define the presentation XAML namespace and the standard XAML namespace.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
7
XML elements can be nested,creating parent elements and child elements.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
8
XAML is used to define the app's ________.

A) program logic
B) graphical user interface
C) code behind classes
D) All of the above.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
9
XAML is used to describe the ___________ of a WPF app.

A) classes
B) program logic
C) code-behind file
D) GUI
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
10
Using XAML gives WPF the benefit of raster-based graphics.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
11
The app's primary code-behind class has filename _______.

A) Application.xaml
B) Application.xaml.cs
C) Window1.xaml
D) Window1.xaml.cs
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
12
A StackPanel has a vertical or horizontal flow,set by its _____ attribute.

A) Order
B) Orientation
C) FlowType
D) Direction
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
13
WPF uses _________ graphics,which allows graphics to scale without losing quality.

A) bitmap
B) vector
C) raster-based
D) jpeg
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
14
A content control can have text or several child elements.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
15
A key benefit of WPF is that it provides a single platform to handle GUI,images,animation 2D and 3D graphics,audio and video.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
16
A Grid is a type of layout container.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
17
The StartupUri attribute defines which XAML document loads first.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
18
A XAML document has exactly one ______

A) root element
B) start tag
C) end tag
D) child element
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
19
XAML is a specialized vocabulary of ___________.

A) HTML
B) XML
C) ASP.NET
D) WPF
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
20
One problem with using XAML is that GUI design is slightly integrated with programming.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
21
Layout of controls refers to the controls' _____.

A) size
B) event handlers
C) position
D) a and b
E) a and c
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
22
The ________ property determines the amount of space around a control's edges.

A) Padding
B) Margin
C) Space
D) Edges
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
23
The _______ property of an event stores a reference to the control that triggered the event.

A) Target
B) Source
C) SourceControl
D) EventTarget
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
24
A WPF Grid control allows child elements to be positioned using explicit coordinates.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
25
Flow-based layouts allow the GUI to display correctly when the user resizes the window.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
26
How does the size setting Auto size the control

A) It uses the maximum possible size to fill the area
B) It uses a relative size
C) It uses the smallest possible size to fit its contents
D) a and b
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
27
Use the ____________ method to programmatically close an app.

A) Application.Shutdown
B) Application.Exit
C) Application.Current.Exit
D) Application.Current.Shutdown
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
28
A MouseMove event passes information using a MouseMoveEventArgs object.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
29
A layout container's ______ property stores a list of its child elements.

A) Children
B) ElementList
C) FlowItems
D) List
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
30
A MouseLeftButtonDown event passes information using a MouseButtonEventArgs object.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
31
If a command is disabled,all methods of executing that command are disabled.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
32
A bubbling event travels down the container hierarchy,and a tunneling event travels up the container hierarchy.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
33
A MouseEventArgs object's GetPosition event always returns a position relative to the top left of the WPF window.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
34
A routed event is ignored after its Handled property is set to True.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
35
A shape can be given an absolute position in a Canvas using the Canvas's methods ________ and________.

A) SetX, SetY
B) SetLeft, SetTop
C) PositionX, PositionY
D) PadLeft, PadTop
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
36
Events which can travel up or down the container hierarchy are called ______.

A) expandable events
B) sourced events
C) bubble events
D) routed events
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
37
The CanExecute event for a command allows programmers to implement logic that determines whether a command should be enabled or disabled.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
38
WPF events which behave like Windows Forms events are called ______.

A) expandable events
B) tunneling events
C) bubbling events
D) direct events
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
39
WPF provides the ability to create ____________,actions or tasks that may be triggered by many different user interactions.

A) multi-events
B) shared events
C) commands
D) b or c
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
40
It's a good practice to use ranges for the size and relative location for the position of WPF controls.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
41
Static resources and dynamic resources differ because static resources are set at initialization time and dynamic resources can be modified by the app.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
42
The ItemsSource property of a ListView must refer to the name of a DataTemplate element.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
43
A WPF style is a set of that can be reused for any number of controls.

A) property-value definitions
B) event-handler definitions
C) background images
D) a and b.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
44
Keyword ________ is used for constants whose values cannot be determined at compile time.

A) const
B) readonly
C) static
D) None of the above.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
45
Resources are similar to private members.They're accessible only to the controls they're defined in.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
46
Use the ________ property to bind data to information in another XAML element,and the ________ property to bind to a specific property of that element.

A) Binding, Source
B) Target, Property
C) ElementName, Path
D) Target, Source
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
47
Dependency properties provide built-in change notification.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
48
WPF styles require you to explicitly set the individual properties of each control.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
49
Data members declared as readonly must be initialized in their declaration.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
50
A routed command declared in the XAML changes a control's appearance when that control enters a certain state.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
51
WPF controls are 'lookless,' meaning that their appearance can be set by any control template.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
52
Colors are represented by three color values and the alpha value,specifying

A) brightness
B) opacity
C) a blending constant
D) None of the above.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
53
A CollectionViewSource provides multiple "views" of the same data.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
54
In addition to GUI appearance,styles can also contain event handlers.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
55
A control's Background property is a customizable ________ object.

A) Color
B) BackColor
C) GUIcolor
D) None of the above
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
56
Which of the following is not a data provider for WPF data binding

A) ObjectDataProvider
B) SqlDataProvider
C) XmlDataProvider
D) None of the above.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
57
Setting the property to None removes the standard window frame containing the title and buttons to minimize,maximize and close the app.

A) Frame
B) Title
C) WindowStyle
D) WindowFrame
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
58
WPF provides built-in functionality--such as minimizing,maximizing and closing the window--for custom windows.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
59
Custom control templates allow you to completely customize a control's appearance.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
60
The attribute declares the control modified by a control template.

A) Type
B) TargetType
C) TargetControl
D) Control
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 60 flashcards in this deck.