9
Windows Forms in Visual Studio 2005: An in-depth look at key features Name: Joe Stegman Title: Lead Program Manager Session code

Windows Forms - Advanced

Embed Size (px)

Citation preview

Page 1: Windows Forms - Advanced

8/12/2019 Windows Forms - Advanced

http://slidepdf.com/reader/full/windows-forms-advanced 1/9

Windows Forms in Visual Studio 2005:

An in-depth look at key featuresName: Joe Stegman

Title: Lead Program Manager

Session code

Page 2: Windows Forms - Advanced

8/12/2019 Windows Forms - Advanced

http://slidepdf.com/reader/full/windows-forms-advanced 2/9

  2

 Agenda

• ToolStrip Controls – Creating Customized, Professional Applications

• Working with Data and the DataGridView – Binding to business objects

• BackgroundWorker – Making an application more responsive

• TableLayoutPanel – Simplifying Localization

• Configuration APIs – Storing Application and User State

• Questions

Page 3: Windows Forms - Advanced

8/12/2019 Windows Forms - Advanced

http://slidepdf.com/reader/full/windows-forms-advanced 3/9

  3

Demo: Customizing ToolStrips

• Extensibility Models

 –  Custom “Renderers” 

• “Renderers” control the look and feel of theToolStrip and ToolStrip Items

 – Custom Items (ToolStripItem derivation)

• Extend ToolStrip item types

• Full designer support for custom ToolStrip

items

 – Control Hosting

• Host Windows Forms Controls in ToolStrips

Page 4: Windows Forms - Advanced

8/12/2019 Windows Forms - Advanced

http://slidepdf.com/reader/full/windows-forms-advanced 4/9

  4

Demo: Data and the DataGridView

• DataGridView – Flexible, Extensible, Performant

• Bound, Unbound, Virtual, Mixed

• Text, Image, Button, Link cells/columns

• Cell-based not Column-based – Cell styles (Font, Color, Formatting)

 – Cell-level events

» Mouse, Formatting, Validate, Error, Others...

• BindingSource – Enables design time business object binding

• New Binding Types – BindingList<T>: Generic IBindingList

 – INotifyPropertyChanged: Simplifies the implementationof property change notification

Page 5: Windows Forms - Advanced

8/12/2019 Windows Forms - Advanced

http://slidepdf.com/reader/full/windows-forms-advanced 5/9

  5

Demo: BackgroundWorker

• BackgroundWorker – Simplify creating responsive applications

• Easier to perform long running tasks without

“freezing” the UI 

 – Simplify Thread use in Windows Forms

applications

Page 6: Windows Forms - Advanced

8/12/2019 Windows Forms - Advanced

http://slidepdf.com/reader/full/windows-forms-advanced 6/9

  6

Demo: TableLayoutPanel

• Layout Controls

 – TableLayoutPanel

• Similar to HTML Table control•  Address localization scenarios

• Facilitate creation of resizable UI

 – Support data driven UI (e.g. labels from a DB)

 – FlowLayoutPanel

• Child controls “flow” like default HTML layout mode 

Page 7: Windows Forms - Advanced

8/12/2019 Windows Forms - Advanced

http://slidepdf.com/reader/full/windows-forms-advanced 7/9

  7

Demo: Client Configuration

• Configuration APIs – Support reading/writing user state

• Example: User’s last opened file 

 – Support reading/writing application state

• Example: Application specific data source

connection string

 – Full designer support

 – Extensible provider model

Page 8: Windows Forms - Advanced

8/12/2019 Windows Forms - Advanced

http://slidepdf.com/reader/full/windows-forms-advanced 8/9

  8

Resources: Windows Forms

• Smart Client on MSDN: – http://msdn.microsoft.com/smartclient 

 – http://msdn.microsoft.com/smartclient/understanding/windowsforms 

 – http://msdn.microsoft.com/smartclient/community/wffaq/wf20.aspx • Windows Forms web site:

 – http://www.windowsforms.net 

• Beta 1 Samples: – http://www.windowsforms.net/Default.aspx?tabindex=4&tabid=49#Whidbey

%20Beta%201 

• Online Discussion Forums: – http://forums.microsoft.com/msdn/default.aspx?ForumGroupID=2 

 – http://msdn.microsoft.com/smartclient/community/discussions/default.aspx 

Page 9: Windows Forms - Advanced

8/12/2019 Windows Forms - Advanced

http://slidepdf.com/reader/full/windows-forms-advanced 9/9

  9

© 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only.

MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.