Monday, 11 June 2012

Interview Questions on Windows Presentation Foundation(WPF):

Q 1) What is WPF?
Q 2) What is XAML?
Q 3) What is XBAP?
Q 4) How can I override the Logical Tree?
Q 5) How can I enumerate all the descendants of a visual object?
Q 6) How can I create Custom Read-Only Dependency Properties?
Q 7) How can I use Dependency Property MetaData?
Q 8) How can I register the default value of the State dependency property to be false?
Q 9) What is Attached Properties and how to register it?
Q 10) How can I set an attached property in code?
Q 11) What is a Routed event?
Q 12) How can I handle the input event through XAML?
Q 13) How can I use an application resource?
Q 14) What are the requirements for a property to be animated?
Q 15) How do I trigger an animation when the data in the control is changed?
Q 16) What is Path animation?
Q 17) What is a Freezable?
Q 18) How can I determine whether a Freezable Is Frozen?
Q 19) How can I obtain a writable copy of a Read-Only Freezable?
Q 20) What is Commanding in WPF?
Q 21) How do I create a CommandBinding using a RoutedCommand?
Q 22) How can I add a CommandBinding to a window using markup?
Q 23) When I try to add multiple controls to a button it shows an error, how do I add multiple controls to a button?
Q 24) How placing controls in a WrapPanel differs from a Grid?
Q 25) How can I restrict the use of style?
Q 26) How can I create an extended style?
Q 27) How can I set a ControlTemplate?
Q 28) How can I create a custom WPF button whose look and feel depends on the Windows desktop theme currently in use? How do I get notified when the user changes the theme?
Q 29) What are the limitations of Inline Styles and Templates?
Q 30) How can I map CLR Namespaces to XML Namespaces in an Assembly?
Q 31) Which namespace is used to associate namespace identifiers with element names? Is there any effect on the attributes?
Q 32) What is the use of x:code?
Q 33) What way can a custom class can be defined in XAML?
Q 34) How can I apply the TypeConverter Attribute?
Q 35) How can I create Four Button controls with the contents set to a String, a DateTimeObject, an UIElement and A Panel that contains other UIElement objects?
Q 36) Can I create a ContentTemplate and apply the template to a ContentControl?
Q 37) How can I create a ControlTemplate for a HeaderedItemsControl?
Q 38) How can I make a style for a ContentControl so that the control has an enhanced visual appearance?
Q 39) How can I get an enumerator to the ContentControl's logical child elements?
Q 40) How do I create a Borderless Window in WPF?
Q 41) How can I animate a BorderThickness value?
Q 42) How can I use Event Trigger to control a StoryBoard after it is started?
Q 43) How do I add controls to Panel Content Model type of controls?
Q 44) How can I store a given document in a specific format using CreateSerializerWriter methods?
Q 45) How can I use MemoryStream to create a deep clone of a serializable object?
Q 46) How can I do versioning using Custom Serialization?
Q 47) How can I Match Annotations with Annotated Objects?
Q 48) How can I create an application that is used to declare a Context Menu with routed commands that the users can access to create and manage annotations?
Q 49) How can I define three paragraphs under one section?
Q 50) How can I use the BlockUIContainer element to host UIElement objects within Flow content?
Q 51) Can I embed a figure into a paragraph of text?
Q 52) How can I programmatically print XPS Files?
Q 53) How can I create a combine hard and soft shadow?
Q 54) How can I use a DoubleAnimation to rotate the textblock?
Q 55) What is the order in which the controls are rendered?
Q 56) How do I enumerate child objects in a visual tree?
Q 57) How rendering in WPF differs from WIN32 applications?
Q 58) When an animation is applied, the property value gets overwritten. How do we prevent the value of property?
Q 59) Performance gets reduced even after navigating away from a page that contains animation. How do we handle this issue?
Q 60) How do I apply an animation without using a storyboard?
Q 61) How do I apply BitmapEffect to a particular area of an Image?
Q 62) How do I apply Transform when an event is occurred?
Q 63) In what way CombinedGeometry is used?
Q 64) What are the properties that reduce the performance of a 3D graphics?
Q 65) How lights are useful in 3D graphics?
Q 66) How do I change the location of a model?
Q 67) How HitTest methods in VisualTreeHelper is useful?
Q 68) How do I use DrawingVisual object?
Q 69) What is an adorner?
Q 70) Where can adorners be used?
Q 71) How to add a custom adorner?
Q 72) How do I bind an Adorner to an Element?
Q 73) How do I remove the Adorner from an element?
Q 74) Where can I find information about guidelines to be followed while designing Stylable controls?
Q 75) What are the different models for Control authoring?
Q 76) What is the use of a ControlTemplate?
Q 77) How to access elements that are embedded inside the ControlTemplate?
Q 78) How do I build an ItemsControl ControlTemplate?
Q 79) How to edit templates using Microsoft Expression Blend?
Q 80) How to get the default template of a control programmatically?
Q 81) How to use binding in XAML?
Q 82) What is the use of the RelativeSource property?
Q 83) What is DataContext? How is it used?
Q 84) Can ItemControl's Items and ItemsSource properties be modified simultaneously?
Q 85) How do I filter Items in an ItemControl when the ItemControl's ItemsSource is set to a datasource?
Q 86) What are the uses of BindingModes?
Q 87) How do I update the source as I type in a TextBox?
Q 88) When an XMLDataProvider can be used? What are it's specific uses?
Q 89) How does TwoWay BindingMode work in an XMLDataProvider?
Q 90) In what way is an ObjectDataProvider useful?
Q 91) How to pass a parameter to a constructor using ObjectDataProvider?
Q 92) How to pass a parameter to a function using ObjectDataProvider?
Q 93) How can I bind a method and pass a parameter to the method?
Q 94) How to Get or Set a value that indicates whether to include the DataErrorValidationRule?
Q 95) What are the objects involved in DragandDrop?
Q 96) How do I create a DataObject?
Q 97) How do I retrieve data from a DataObject?
Q 98) What is Serialization?
Q 99) How to write an IsolatedStorage to an XML file?
Q 100) How do I serialize objects to a binary file?
Q 101) What are the three types of Localizability Attributes and how to use them?
Q 102) How can I set the Language property to the current user's UI language?
Q 103) How can I set the substitution property by overriding the default substitution?
Q 104) How can I specify in the .proj file whether to leave the free-form localization comments in the assembly using LocalizationDirectivesToLocFile tag?
Q 105) How can I add localization comments to an XAML file?
Q 106) Can I override the default categories for platform controls in XAML as well?
Q 107) How can I automatically layout Grids Using the IsSharedSizeScope Property?
Q 108) How does ClickOnce deployment work?
Q 109) Can I add prerequisites in my ClickOnce deployment?
Q 110) How do I enable automatic updates for my application using ClickOnce deployment?
Q 111) What is the difference between Frame and NavigationWindow?
Q 112) How does Rendering work in Frame control?
Q 113) Can I add dynamic HTML content to a Frame control?
Q 114) Are XAML Browser Applications OS independent?
Q 115) When I run an XBAP application, I get Application Deployment Error. What do I do to overcome this error?
Q 116) How to navigate between pages in an application?
Q 117) How to set content of a NavigationWindow?
Q 118) How do I handle Back and Forward button click?
Q 119) How do I pass data between pages in a NavigationWindow?
Q 120) How do I add registry entries in a setup project?
Q 121) How do I deploy shared components?
Q 122) How launch conditions are useful and how to add one to a setup project?
Q 123) How do I create a child window in WPF?
Q 124) How do I host Windows Forms control in a WPF Window?
Q 125) Does WPF support MDI?
Q 126) How can I write Message Loops?
Q 127) How can I HwndSource Treats ComponentDispatcher Events?
Q 128) How can I set the Owner property of the WPF window to the handle of our main form using helper class?
Q 129) How can I use Windows Forms in a WPF application?
Q 130) How do I host a Windows Forms control in a WPF application?
Q 131) How can I leverage my current investment in Windows Forms applications and still tap into the cool features of WPF?
Q 132) How can I host a Windows Forms Composite Control in Windows Presentation Foundation?
Q 133) How do I host a WPF control in a Windows Forms application?
Q 134) How can I Host the WPF UserControl in Windows Forms?
Q 135) What is the procedure to host the WPF content in Win32 window?
Q 136) Will you provide a tool to convert Windows Forms applications to WPF applications?
Q 137) What about user controls and third-party controls including ActiveX controls?
Q 138) Where do I find System.Windows.Forms.Integration?
Q 139) Can I use a WindowsFormsHost element to host a System.Windows.Forms?
Q 140) How do I assign full trust to an XBAP application?
Q 141) I am able to access the registry using full trust XBAP application in debug mode, when hosted in an intranet, the application gets crashed. What do I do?
Q 142) How do I get a custom defined permission set of an XBAP application?
Q 143) How to get data from database in XBAP application?
Q 144) Does permission set of partial trust change in the Local Intranet and Internet?
Q 145) How do I detect permission for a file in a partial trust application?
Q 146) Can a WPF application be designed using Microsoft Expression Blend?
Q 147) How do I add animations using Microsoft Expression Blend?
Q 148) How do I add custom controls to an application using Microsoft Expression Blend?
Q 149) What is ZAM3D?
Q 150) What are the file formats supported by ZAM3D?
Q 151) Can an XAML file created using ZAM3D be used with Visual Studio.NET?
Q 152) What is XAMLPAD?
Q 153) Does XAMLPAD support custom controls?
Q 154) Can we see the output of an XAML using XAMLPAD?
Q 155) Can I delay the display of a ToolTip?
Q 156) How can I use the ToolTipService properties to specify the position of a tooltip whose content is not a ToolTip object?
Q 157) Can I use the BetweenShowDelay Property?
Q 158) How can I make a TextBlock editable when it is clicked and the value is committed when ESC or ENTER is pressed?
Q 159) How do I prevent the user from changing the selected tab page in a TabControl?
Q 160) How do I dynamically hide and unhide tabs in a TabControl?
Q 161) How do I make the tabs in a TabControl appear on the bottom instead of the right?
Q 162) How can I add a style to a TabItem that is used in the TabControl?
Q 163) How can I create a ProgressBar and use an animation to simulate the progress of an operation?
Q 164) How can I make the text changed by itself during progress?
Q 165) How can I create and display a PrintDialog?
Q 166) How do I display the PrintPreview as a maximized window and control it's zooming?
Q 167) How can I animate a Popup?
Q 168) How can I specify a Custom Popup Position?
Q 169) How do I format numbers, dates and currencies in a TextBox?
Q 170) How do I make a TextBox use all upper-case (or lower-case) characters?
Q 171) How do I support browsing for a text file and reading it into a TextBox?
Q 172) How can I use the attached properties of Canvas to position child elements?
Q 173) How do I fill a ComboBox with the available fonts?
Q 174) How do I bind the values of an enum to a ComboBox?
Q 175) How do I bind a string array with a ListBox?
Q 176) How do I display items in a ListBox horizontally?
Q 177) How do I create custom layout for StatusBar items?
Q 178) How do I determine which button in a ToolBar is clicked?
Q 179) How can I apply a Style to a Menu control on a ToolBar?
Q 180) When I tab into a toolbar in WPF I can't tab out again ? What can I do to change this tab behavior?
Q 181) How do I make the Context Menu appear only when clicked at certain portions of the Control?
Q 182) How can I enable a Context Menu on a disabled Control?
Q 183) How can I create a shared Context Menu?
Q 184) How do I make the Context Menu to close after a set time interval?
Q 185) How can I create an Expander with a ScrollViewer?
Q 186) How can I bind the Expander's header element's Width to the ActualWidth of the Expander?
Q 187) How do I make the Expander button to be justified to the right, rather than the left which is the default?
Q 188) How can I replace the style of a DocumentViewer?
Q 189) How can I extend the style of a DocumentViewer?
Q 190) How can I DataBind DocumentViewer's Zoom Property to a TextBox?
Q 191) How to load an XPS document into the DocumentViewer?
Q 192) How can I load an XAML file into a FlowDocumentReader?
Q 193) How can I save the contents of a FlowDocumentReader as an XAML file?
Q 194) How can I create a GroupBox that has a title and a visible border that encloses it's content?
Q 195) How can I make sure that a GridSplitter Is visible?
Q 196) How can I create and use a GridLengthConverter Object?
Q 197) How can I convert an Image to grayscale?
Q 198) How can I crop an Image?
Q 199) Why does adding images to an ImageList in the Designer cause them to lose their alpha channel?
Q 200) How to rotate an image?
Q 201) How do I access / edit the metadata associated with an Image?
Q 202) How can the DrawVisual be used for rendering images?
Q 203) How do I enable the mnemonics (underlines) being displayed when an application is launched?
Q 204) How can I style a Separator used as a Menu Item?
Q 205) How can I use the member values of the enumeration to set the HorizontalScrollBarVisibility property of the ScrollViewer control?
Q 206) How can I use the Content-Scrolling Methods of ScrollViewer?
Q 207) How can I customize the Ticks on a Slider?
Q 208) Can I bind two sliders in two different windows?
Q 209) How do I add a hyperlink to a RichTextBox control?
Q 210) How do I create and save a RichTextFormat (RTF) file?
Q 211) How do I support drag-and-drop for a RichTextBox?
Q 212) How can I Save, Load, and Print RichTextBox Content?
Q 213) How can I animate the thickness of a border by using ThicknessAnimation?
Q 214) How can I use a BulletDecorator control that uses an image as the Bullet and a non-text element as the Child?
Q 215) How do I change the shape of the button to an ellipse?
Q 216) how to use WPF with ASP.NET 2008 (C#) with Demo.