WPF Code FAQ
I am a big believer in the power of Windows Presentation Foundation technology introduced by Microsoft in .Net framework 3.0. Subsequently since then in 3.5 and 3.5 beta 1 it’s more matured and gone much deeper and powerful with hardware acceleration and graphics capabilities. Microsoft Surface the table top multi touch interface computer/device can be a huge platform for WPF applications apart from desktop and enterprise apps.
We all know there are theoritical FAQs when we start learning and studying something. Today I found a very nice WPF coding FAQ which can be very useful. Infact it’s awesome.
Here’s a list of questions being answered.
1. Application Model
1.1 Is WPF resolution independent?
1.2 Should we manually cleanup the resources used by WPF bitmaps or Image controls?
1.3 Is it possible to change the Z-order of hosted Windows Forms control in WPF?
1.4 How to host a WPF/XBAP application in ASP.NET pages?
1.5 How to use Windows Forms control (e.g. Crystal Report Viewer) in a WPF application?
1.6 Is it possible to subclass from XAML generated class in WPF?
2. Base Services (Threading, Keyboard/Mouse handling & Dependency Properties)
2.1 Where is Application.DoEvents in WPF?
2.2 How to access WPF controls from another thread?
3. Controls
3.1 How to expand all nodes (TreeViewItems) of TreeView control?
3.2 How to do lasso (drag & select) selection in ListBox/ListView?
3.3 How to implement RadioButtonList type of control in WPF?
3.4 How to keep only one Expander control opened in a group of Expander controls?
3.5 How to automatically check TreeView children nodes when parent is checked?
3.6 What is ContentPresenter?
4. Text & Documents
4.1 How to find and replace text in RichTextBox?
5. Styles
5.1 When styling Button control, why does it have different theming behaviors under Windows XP and Windows Vista?
5.2 How to re-style or re-template a Popup control?
5.3 How to customize a Window in WPF?
6. Data Service
6.1 What’s the difference between TemplateBinding and Binding?
6.2 What is CollectionView?
6.3 How to enable multi-threaded data binding in WPF?
7. Visuals (2D/3D Graphics, Animation & Media)
7.1 How to use RenderTargetBitmap?
7.2 How to animate the size of a Window in WPF?
7.3 Why Viewport2DVisual3D.Camera is frozen when animating it?
8. Imaging
8.1 Is there any efficient method in WPF to draw graphics at pixel level?




