CS411 TODAY’S CURRENT MIDTERM PAPERS dated 12-1-23

CS411 CURRENT MIDTERM PAPER

TODAY’S CS411 CURRENT MIDTERM PAPER  SOLVED BY ZAIN NASAR DATED: 12-1-23

CS411 CURRENT MIDTERM PAPER

TODAY’S CS411 CURRENT MIDTERM PAPER 

Here You Can find CS411 Current Midterm Paper shared by Virtual University students, this paper help you in the Midterm exam.

1. Every __________ is represented by an event object.
Information
Entity
Object
Event (correct Ans)

2. Which statement is True about interfaces?
An interface can contain only methods, variables, events, and indexers.
An interface can contain only variables, properties, events, and indexers.
An interface can contain only methods, properties, variables, and indexers.
An interface can contain only methods, properties, events, and indexers. (correct Ans)

3. Which one is the correct syntax for declaring an attribute?
[Obsolete] (correct Ans)
{Obsolete}
(Obsolete)
*Obsolete
4. An “object” element can have _________ type/s of children.
Four
Three (correct Ans)
Two
One
5_________ allows keeping the user interface description and implementation separate.
1) GDI
2) WPF (correct Ans)
3) Avalon
4) Altia
6. There is/are _____ type(s) of padding in WPF element.
One
Two
Three (correct Ans)
Four
7. Which of the following is not a “C#” feature?
Operator overloading is not allowed. (correct Ans)
Multiple Inheritance is not supported but interfaces are supported.
Enumeration members are scoped.
Global variables or functions are not allowed.
8. Stylus can behave like a ___________ but has ___________resolution.
Keyboard, lower
Mouse, lower
Mouse, higher (correct Ans)
Keyboard, higher
9. Attributes are declared ________ the class/function.
Within
After
Above
Outside
10. If we want that “Stretch” property of the child element to take the available “height or
width of parent” and shape of the child element doesn’t change, then we should write
“Stretch = ________”.
Fill (correct Ans)
UniformToFill
Uniform
11. The code given below is equivalent to _________.
<SolidColorBrush>White</SolidColorBrush>
<WhiteBrush >MyWhiteBrush </ WhiteBrush>
<SolidColorBrush Color=”White”/> (correct Ans)
<Brush Style= “SolidWhite”
> None of the given options
12. Visual Studio has a snippet called __________ that automatically expands into a definition of a
dependency property, which makes defining one much faster than doing all the typing yourself!
Propdp (correct Ans)
Property extension
Dpprop
Dependency property
13. Multiple ________ are conventionally stored in multiple files.
Functions
Values
Variables
Classes (correct Ans)
14. “Situation” is an event occurs that requires a (n) __________.
Reaction(correct Ans)
Class
Object
Action
15. We have two buttons “b1” and “b2”. If we want to place “b1” on “b2” then the value of
“ZIndex” of “b1” should be ______ the value of “ZIndex” of “b2”.
Less than
Greater than
Equal to
No need to give the value of ZIndex of the b1 (correct Ans)
16. Events can be ______________.
Specialized
All of the given options (Page 15)
Composed
Generalized
17. Wpf 3.5 released in
2005
2006
2008 (correct Ans)
2009
18. The corresponding type converter class for “Brush” class will be _________.
Brush Converter (correct Ans)
CastBrush
BrushCast
None of the given options
19. Which “transform” property can help us to flip the element from its center?
ScaleY
None of the given options
ScaleX
RenderTransformOrigin (correct Ans)
20. CLI stands for ________________________________.
Compact Language Infrastructure
Common Language Infrastructure (correct Ans)
Console Language Infrastructure
Control Language Infrastructure
21. The elements in a/an _________ are always stored in a contiguous block of memory.
Tree
Array (correct Ans)
Variable
Struct
22. The ________ statement iterates over each element in an “enumerable” object.
Foreach (correct Ans)
Do while
While
For
23. If we want that “Stretch” property of child element takes the available “height or
width of parent” and shape of child element doesn’t change, then we should write
“Stretch = ________”.
1
Fill (correct Ans)
UniformToFill
Uniform
24. We are checking that whether an element is eligible for focus or not, which property
will help us in this testing?
Focus
IsFocus
IsFocusable
Focusable (correct Ans)
25. The directory is the class of _________________.
System.Collections.Generic
System.Reflection
System.Text
System.IO (correct Ans)
26. Q: how ali will make xaml document name ?write the sythnx? Kuch asa tha. 2marks
27. Q: Why most WPF classes are inherently thread-unsafe?
Ans: Most WPF classes derive from dispatcher object and are therefore inherently
thread-unsafe. The Dispatcher part of the name refers to wpfs version of a Win32-like
message loop,
28. Q: Name the properties supported by the ScaleTransform also write its default values of
each of Them?
ScaleTransform
ScaleTransform enlarges or shrinks an element horizontally, vertically,
or in both directions. This transform has four straightforward double properties:
. ScaleX—Multiplier for the element’s width (default value = 1)
. ScaleY—Multiplier for the element’s height (default value = 1)
. CenterX—Origin for horizontal scaling (default value = 0)
. CenterY—Origin for vertical scaling (default value = 0)
<Button.RenderTransform>
<ScaleTransform ScaleX=”2″ ScaleY=”2″/>
</Button.RenderTransform>
29. Q: Consider the following code snippet and write the output:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(“<uni name=\’Virtual\”> university Node</uni.”);
console.writeLine(xmldoc.DocumentElement.Name);
console.writeLine(xmldoc.DocumentElement.InnerText);
console.readline();
ANS: Element Name: Virtual Inner Text: University Node
30 Q: What we achive from ZIndex codes?
ZIndex is an
integer with a default value of 0 that you can set to any number (positive or negative).
Elements with larger ZIndex values are rendered on top of elements with smaller ZIndex
values, so the element with the smallest value is in the back, and the element with the
the largest value is in the front.
31. What difference b/w Margin and padding??? 5 marks ka tha.
Margin and Padding
Margin and Padding are two very similar properties that are also related to an element’s
size. All FrameworkElements have a Margin property, and all Controls (plus Border) have
a Padding property. Their only difference is that Margin controls how much extra space
gets placed around the outside edges of the element, whereas Padding controls how
much extra space gets placed around the inside edges of the element.
Both Margin and Padding are of type System.Windows.Thickness, an interesting class
that can represent one, two, or four double values. The meaning of these values is
demonstrated in Listing 4.1, which applies various Padding and Margin settings to Label
controls. The second set of Labels is wrapped in Borders because the margin settings
would not be noticeable otherwise. Figure 4.2 shows the rendered result for each Label
if each one is individually placed in a Canvas (a panel covered in the next chapter).
Although not shown in this figure, Margin permits negative values. Padding does not.
32. Q: Dock panel may fill k option nahi hoty tu ager hum ko fill karna ha tu kia option use karygay2
marks ka tha.
We will set Background = “Red
33. Q: How many children an object can have, name them (3 marks)
ANS:An object element can have three types of children
: 1. A value for a content property,
2. Collection items
3. A Value that can be type-converted to the object element.
34. Q: which functionality is actually a superset of stack panel functionality.(3 marks)
ANS: Stack Panel is popular, simple, useful, stacks sequentially. It is one of the few panels that dont
even
define an attached property. Orientation can be horizontal or vertical (which is default). Default
horizontal
direction is based on the flow direction
35. Q: default value btani thi “ Max height “ “Min Height “ “ Max width” R “Minm Width” (5 marks)

HERE YOU CAN ALSO DOWNLOAD:-

5 2 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments