Visual Studio Design Time Tools - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Visual Studio Design Time Tools

Description:

Custom Property Grid. UITypeEditors. What is a UI Type Editor ... This is where your custom form goes. Decorating Your Property ... – PowerPoint PPT presentation

Number of Views:130
Avg rating:3.0/5.0
Slides: 18
Provided by: jimd50
Category:
Tags: custom | design | studio | time | tools | visual

less

Transcript and Presenter's Notes

Title: Visual Studio Design Time Tools


1
Visual Studio Design Time Tools
  • Rod Paddock
  • Dash Point Software, Inc.

2
About Box
  • Rod Paddock
  • rodpaddock_at_dashpoint.com
  • President, Dash Point Software
  • Editor, CoDe Magazine
  • Microsoft VB.NET MVP
  • VB.NET, C, SQL Server Architect/Developer

3
Objectives
  • What are Design Time Tools
  • Why Design Time Tools Are Important
  • Building An Extender Class
  • Property Grids Exposed
  • UITypeEditors Exposed

4
What Are Design Time Tools?
  • Custom Code Added to the Visual Studio IDE
  • Can Include
  • Custom Components
  • Extender Classes
  • Custom Property Editors
  • Custom Property Sheets
  • Etc

5
Why Are Design Time Tools Important
  • One Word--- PRODUCTIVITY!

6
Extender Classes
  • What is an Extender Class ?
  • Adds New Properties To Existing Controls
  • The Importance of Extenders
  • Pseudo Replacement for Multiple Inheritance

7
Implementing Extenders
  • Inherits Component
  • Implements IExtenderProvider
  • CanExtend
  • Returns True if Control Type Supports Extender
  • ltProviderProperty(ltPropertyToAddgt",
    GetType(Control)), _
  • Controls Stored in HashTable
  • Add Properties To Control with GetltpropertyNamegt
    and SetltPropertyNamegt Notation

8
Demonstrating Extender Code

9
Property Grids
  • What is a Property Grid
  • Add One To Your Toolbox
  • Add Tab
  • Add Remove Controls
  • Select PropertyGrid

10
Using the Property Grid
  • Add One To Your Form
  • Apply the SelectedObject property
  • Any Object
  • Thats it
  • Problems with PropertyGrid
  • Shows all Properties
  • Solution.

11
Creating a Custom Property Grid
  • Create 2 Classes
  • Inherits PropertyGrid
  • Inherits PropertyTab
  • Override PropertyGrid.CreatePropertyTab
  • Override PropertyTab.GetProperties
  • Add Code to Create Filtered List of Supported
    Properties
  • Add Custom Interface To Your Controls

12
DEMO Custom Property Grid
13
UITypeEditors
  • What is a UI Type Editor
  • Provides Custom Editor for Properties
  • Examples
  • Font Selector
  • Color Selector
  • Cool Abstraction
  • Writing Code to Write Code

14
Implementing UITypeEditor
  • Imports System.Windows.Forms
  • Imports System.Drawing.Design
  • Inherits UITypeEditor
  • Overrides
  • GetEditStyle
  • GetPaintValueSupported
  • EditValue
  • This is where your custom form goes
  • Decorating Your Property
  • ltEditor(GetType(MyEditor), GetType(UITypeEditor))

15
UI Type Editor Demo
16
On Minor Enhancement
  • UI Type Editors Show Up in Custom Property Sheet
    When
  • You add the following attribute
  • Browsable(True)

17
Wrap Up
  • Questions?
  • Answers?
  • rodpaddock_at_dashpoint.com
  • www.dashpoint.com
  • www.officezealot.com/rod
  • Thank you.
Write a Comment
User Comments (0)
About PowerShow.com