Chapter 17 Flashcards
How to add a new property in dependency property
Through RegisterAttached method
e.g. we can set Fontsize property to an element
What is sealed class
When we use seal keyword with any class then we can not inherit any thing from that class.
Can we put additional data with sealed class object and if yes then how
Yes. Using Dependency Property with its get and set method.
How can we save arbitrary data
Using tagproperty method
What is panel
They are used only for layout of elements
What 2 things tells the position of an element
- Element itself
2. Its parent
What are 3 factors of layout
- Size
- Position
- Transform
What is the default value for min height and min width
0 Or infinity
What happen when we give NaN to size property of a element
Not a number. Then element size adjust according to its parent.
What is replacement of NaN in XAML
auto
What is the difference between margin and padding
Margin is the space outside the border of an element, while Padding is the space that is inside the border of it.
What is logical pixel and physical pixel
physical pixels are the actual number of pixels a device has. and logical is its opposite. Logical makes device independent.
What are 3 values for visibility property
- Visible
- Hidden
- Collapse (Participate in layout but not visible on screen)
What are 2 types of alignment
- Vertical alignment
2. Horizontal alignment (left, right, center, stretch)
What flowdirection do
Set language flow direction (left to right, right to left)