Click here to Skip to main content
13,768,734 members
Click here to Skip to main content
Add your own
alternative version

Stats

13.3K views
2 bookmarked
Posted 30 Oct 2009
Licenced CPOL

New Options for Visual Studio 2010 Beta2 WPF and Silverlight Projects

, 30 Oct 2009
Rate this:
Please Sign up or sign in to vote.
New Options for Visual Studio 2010 Beta2 WPF and Silverlight Projects

ToolOptions

To get to this Options dialog, use the Tools menu, select Options, select Text Editors, select XAML, select Miscellaneous.

MarkupExtension IntelliSense and Editing

The most requested feature for the WPF & Silverlight XAML Editor was MarkupExtension IntelliSense. This feature has been added to Visual Studio 2010 Beta2.

In addition to IntelliSense, you also get some entry helpers.

  1. When you type a { (left curly brace) Visual Studio will automatically insert the } (right curly brace) for you.

    You can disable this feature by un-checking the above option, “Closing braces for MarkupExtensions.”

  2. When you press the SPACEBAR inside {} (curly braces) Visual Studio will automatically insert a comma for you to the left of the space added by pressing the SPACEBAR.

    You can disable this feature by un-checking the above option, “Commas to separate MarkupExtension parameters.”

Toolbox Auto-Population

Visual Studio 2010 Beta2 now adds all Custom Controls and UserControls in the Solution to the Toolbox when you build the solution. Controls are added to a separate Toolbox tab for each project.

You can disable this feature by un-checking the above option, “Automatically populate toolbox items.”

How Auto-Population Works

When you build a project, its corresponding tab in the Toolbox is cleared and then all types that derive from FrameworkElement are added to the Toolbox tab for that project. (See Fine Print below for more details.)

When you build the solution, all projects Toolbox tabs are updated as explained above.

If you want to prevent an item from appearing in the Toolbox during the Auto-Population processing, decorate the class with the System.ComponentModel.DesignTimeVisible attribute and pass False in the constructor.

The following code snippet shows the DesignTimeVisible attribute decorating the CustomView UserControl. The CustomView UserControl will not appear in the Toolbox.

Imports System.ComponentModel

<DesignTimeVisible(False)>
Public Class CustomerView
    Inherits UserControl

End Class

Fine Print

To appear in the Auto-Population Toolbox process a type must derive from FrameworkElement and:

  1. Are public and have a default public or internal constructor or are internal and have either a default public or internal constructor
  2. Types deriving from Window or Page are ignored
  3. FrameworkElements in other .exe projects are ignored
  4. Internal classes will only be displayed when the active designer is for an item in the same project
  5. Friend Assemblies are not taken into account for Toolbox Auto-Population

Close

Have a great day.

Just a grain of sand on the world's beaches.

Posted in CodeProject, Silverlight, VB.NET, Visual Studio 2010, WPF Controls, WPF General

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Karl Shifflett
Architect Infragistics
United States United States

I’m a passionate Platform Architect at Infragistics.


I’m a long-time WPF-Prism fanatic who enjoys writing developer tools and line of business applications.


My current front end passions are: XAML platforms (Xamarin.Forms, Xamarin, UWP, and WPF), Electron, ES2015 (ES6), Node.js, Aurelia, and AngularJS (Angular 1.5.x).


For the back end I use what is appropriate for the project: SQL Server and ASP.NET WebAPI, MongoDB, Express, Azure, Firebase, etc.


I am very pragmatic software engineer and strive to write simple, maintainable, and testable code. Simple code allows for solving complex problems in a maintainable way.


My Blog


My Github Repros


My YouTube Videos


Just a grain of sand on the worlds beaches.


You may also be interested in...

Comments and Discussions

 
Questionwill there be regions in XAML? Pin
christoph brändle1-Nov-09 2:01
memberchristoph brändle1-Nov-09 2:01 
AnswerRe: will there be regions in XAML? Pin
Karl Shifflett1-Nov-09 16:01
professionalKarl Shifflett1-Nov-09 16:01 
GeneralRe: will there be regions in XAML? Pin
gmagana20-Jan-10 13:00
membergmagana20-Jan-10 13:00 
GeneralRe: will there be regions in XAML? Pin
Karl Shifflett21-Jan-10 2:27
professionalKarl Shifflett21-Jan-10 2:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04-2016 | 2.8.181116.1 | Last Updated 30 Oct 2009
Article Copyright 2009 by Karl Shifflett
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid