210 likes | 623 Views
Windows Forms 2.0 – Controls. Stephen Turner Software Design Engineer sturner@microsoft.com. Windows Forms 2.0 Goals. Bring the ease and reliability of Web application deployment to client applications Professional Look and Feel New controls and enhancements
E N D
Windows Forms 2.0 – Controls Stephen Turner Software Design Engineer sturner@microsoft.com
Windows Forms 2.0 Goals • Bring the ease and reliability of Web application deployment to client applications • Professional Look and Feel • New controls and enhancements • Simplify client application development • Simplify working with data • Fewer lines of code • Fewer clicks
Agenda • New Windows Forms 2.0 features • ToolStrip Controls • Web Browser Control • New Layout Controls • New Control Properties • Grab Bag • Roadmap and resources
ToolStrip Controls • Common API for toolbars, menus, drop-down menus, and context menus • ToolStrip, MenuStrip, StatusStrip, ContextMenuStrip • Items inherit from ToolStripItem • Premium design time experience
Item Types ToolStripButton ToolStripMenuItem ToolStripTextBox ToolStripComboBox ToolStripProgressBar ToolStripDropDownButton Item layout options Item overflowing ToolStripContainer Item Customization Persistence ToolStrip Control Features
ToolStrip Control Render Modes • Professional • System • Custom
WebBrowser Control Features • Optimized managed wrapper • Navigation • Managed code and script interaction • Customize standard IE behavior • Context menus • Accelerator keys
Layout Controls - SplitPanel • Replaces Splitter control • Not based on Z-order • Encapsulates a splitter and two panels • Vertical or horizontal orientation
Layout Controls - FlowLayoutPanel • HTML-style flow layout • Automatically repositions children • Horizontal or vertical flow direction • Insertion bars at design time
Layout Controls - TableLayoutPanel • HTML-style table layout • Cell merging for rows and columns • Absolute, percentage, or autosizing columns and rows • “What you see is what you get” (WYSIWYG) Designer
Control Properties - Layout • Margin and Padding • Margin - spacing that radiates outwards • Padding - spacing that radiates inwards • Defaults to Windows UI style guidelines • AutoSize • Applies to almost all controls • Resize to accommodate contents • Respects Padding and Margin
Control Properties - AutoComplete • AutoComplete • Automatic text suggestion and completion • Supported by TextBox and ComboBox • System or custom lookup sources
Grab Bag • MaskedTextBox • Controls shape of input • MaskedTextProvider • ToolTip • BubbleMode • Icon and Title
More Information? • Visual Studio 2005 Developer Center • http://msdn.microsoft.com/vs2005 • Download Visual Studio Express Editions for free!
© 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.