WPF Interview Questions and Answers Part 4

By
1.) What are the types of  data binding in WPF ?                                                                  
There are two types of data binding in WPF.

  1. Unidirectional (source ---> target  or vice versa)
  2. Bidirectional (source <---> target)
2.) What is Data context  ?                                                                                                             
Data context is the dependency property which contains the data.The data may be following type like:
  • Data set 
  • Collection object
  • CLR Object
  • XML Data Provider etc.
Every WPF Control derived from framework element that is part of a Data  Context property.

3.) What are the Characteristics of Data Binding In WPF ?                                            
There are some characteristics of data binding in wpf.
  • User Interface(UI) can be bound to CLR objects or XML .
  • Dependency properties can also be bound to ado.net and objects associated with web services and web properties.
  • Data templates can be applied to data.
  • Filter,sort and group views can be generated on the top of the data.
 4.) What are the elements used for Data Binding In WPF ?                                           
  1. Source
  2. Source Path
  3. Target Dependency Property
  4. Target Dependency object
 5.) What are the types of Binding modes In WPF ?                                                         
There are four binding modes in wpf.
  1. One Way
  2. One Time
  3. Two Way
  4. OneWayToSource
 6.) What is Event Routing in WPF ?                                                                                        
The Event routing allows an event to originate in one element but be raised by another one.

7.) What are the types of  Routed Events in WPF ?                                                              
There are mainly three types of Routed events in wpf as given below:-
  1. Direct Events
  2. Bubbling events
  3. Tunnelling events
 8.) What is Direct Events in WPF ?                                                                                           
Direct events are like ordinary .NET events. They originate in one element and don’t pass to any other.
Example:-
 MouseEnter (which fires when the mouse pointer moves over an element) is a direct event
 9.) What is Bubbling Events in WPF ?                                                                                     
Bubbling events are events that travel up the containment hierarchy.
Example:-
MouseDown is a bubbling event. It’s raised first by the element that is clicked. Next, it’s raised by that element’s parent, and then by that element’s parent, and so on, until WPF reaches the top of the element tree.

 10.) What is Tunnelling Events in WPF ?                                                                                 
Tunnelling events are events that travel down the containment hierarchy. 
Example:-
It give chance to preview (and possibly stop) an event before it are eaches the appropriate control.

0 comments:

Post a comment

Powered by Blogger.