Welcome to WindowsClient.net | Sign in | Join

XAML Power Toys by Karl Shifflett

XAML Power Toys is a Visual Studio 2008 SP1 Multi-AppDomain Add-In that extends the XAML editor and will dramatically decrease the time needed to produce XAML page layout.

All XAML produced is compliant with.NET 3.5 SP1 WPF and Silverlight 2.

Requirements

XAML Power Toys requires the following:

Goal

The goal of XAML Power Toys is to deliver tools that enable developers to layout and maintain Line of Business (LOB) application forms using the UI controls that ship with Visual Studio.

New Features In v3.5

These are the new features in XAML Power Tool v3.5.

  • XAML Power Toys has been fully updated to support the new release of the WPF Toolkit. There were some property name changes in the DataGrid, these have been updated. We strongly suggest you download the new release of the WPF Toolkit, as the XAML spit from this tool matches the new release and not the previous beta WPF Toolkit.

  • Both the WPF and Silverlight DataGrid XAML design tools now allow you to select the DatePicker. If selected, the DatePicker will be rendered in a DataGridTemplateColumn.

  • Both the WPF and Silverlight form design tools now allow you to select the DatePicker as a UI control that can be rendered on the form.

  • The Silverlight Toolkit was released on 10/28/2008. This toolkit has a Label control. XAML Power Toys supports rendering a Label using the new control. See the Control Defaults section below for guidance on enabling the new Silverlight Label control.

  • The DatePicker has been added to the UI Control Defaults dialog box.

  • The Fields list now supports dragging a DatePicker to the form.

Feature Set

These are the focus features of XAML Power Tools.

  • Create WPF or Silverlight DataGrid for Selected Class. Quickly create a DataGrid with bindings that are easily associated with properties on the source class.

  • Create WPF ListView for Selected Class. Quickly create a ListView with bindings that are easily associated with properties on the source class.

  • Create Business Form for Selected Class. Quickly create a form with bindings that are easily associated with properties on the source class.

  • Create Business Form. Quickly create a form with bindings.

  • Show Fields List for Selected Class. Display a list of class fields similar to Microsoft Access. Allows dragging of fields to create controls.

  • Group Into. Select and group one or more controls inside a new parent control.

  • Change Grid to Flow Layout. Select one or more controls, remove all MinWidth, MinHeight, Margin properties, and set all row and column definitions to Auto.

  • Chainsaw Minimize Cider Designer XAML. Select one or more controls, remove all MinWidth, MinHeight, x:Name, Name, Margin properties, and set all row and column definitions to Auto.

  • Remove Margins. Select one or more controls and remove the Margin property.

  • Edit Grid Column and Rows. Select a grid and add/remove rows and columns.

  • Set Defaults for Created Controls. Custom initial properties set when a new control is created.

  • About Box. See the version of XAML Power Toys installed on your system.

Screenshots

XAML Power Tools contains an extraordinarily rich set of features. These screenshots illustrate only the high-level features.

1-1. Solution Explorer Content Menu 1-2. Solution Explorer Content Menu
1.1 Solution Explorer Content Menu 1.2 Solution Explorer Content Menu
1.3 XAML Editor Content Menu 1.4 Select Class Using Class Picker
1.3 XAML Editor Content Menu 1.4 Select Class Using Class Picker
1.5 Create a Business Form for a Class 1.6 StringFormat Selector
1.5 Create a Business Form for a Class 1.6 StringFormat Selector
1.7 Create Business Form 1.8 Fields List
1.7 Create Business Form 1.8 Fields List
1.9 Control Defaults
1.9 Control Defaults

Videos

These 11 videos are highly recommended. The first video, Installation and Setup, will have you up and running in no time. The others will covered the focus features in depth.

Video Image Installation and Setup (3:46) Video Image Set Control Settings (7:13)
Video Image Create Business Form (5:19) Video Image Build Form For Class (9:33)
Video Image Edit Grid Row Columns (7:22) Video Image Fields List For Class (6:11)
Video Image Grid Tools (Remove Margins, Chainsaw) (5:22) Video Image Group Into (7:28)
Video Image Silverlight DataGrid For Class (9:53) Video Image WPF DataGrid For Class (6:59)
Video Image WPF ListView For Class (7:18)

Overview

The content discussed is the video is not repeated below. We encourage you to watch them all, but especially the XAML Power Toys Installation and Setup video. These will save you a lot of time and you’ll be up and running in just a few minutes.

The source code is provided below for those who have or want to author Visual Studio Add-Ins. Please note that the XAML Power Toys Add-In does not program against an object model–Visual Studio Add-Ins do not have an object model to program against–so the developer is required to select text in the XAML editor. The Add-In then processes the selected text. Even without an object model to program against, XAML Power Toys is very powerful. Try one pass with Grid Row and Column Editor and you see what we mean!

Creating Business Forms, ListViews and DataGrids

When creating a business form for a class, you the project that contains the class must be built. If the source class that you want to make a form for changes, you must rebuild the project so the XAML Power Toys Add-in can properly reflect the properties of the source class.

When selecting a file from the Solution Explorer via right-click, the file name must match the class name. If you have multiple classes in one file or a class in a file with a different name, use the Class Selector in the XAML Editor to create your business form, ListView or DataGrid.

Installation

  • Ensure that you have installed Visual Studio 2008 SP1.

  • Silverlight 2 runtime (if developing an application for Silverlight 2)

  • Microsoft® Silverlight™ Tools for Visual Studio 2008 SP1 (if developing an application for Silverlight 2)

  • Upgrading XAML Power Toys from version 1 or 2 to 3.x? Please use the Add/Remove Control Panel to remove XAML Power Toys before upgrading.

  • Upgrading XAML Power Toys from version 3.0 to 3.x? Just run the install package. You don’t need to uninstall a previous version prior to installing version 3.0 to 3.x.

First Time Use

The first time you use XAML Power Toys please edit and save your Control Default Settings. If you do not do this, and you access a feature that needs them, default settings will be created, saved and a dialog box will display, informing you of the action just taken. By editing and saving your Control Default Settings before using XAML Power Toys, you’ll not only avoid this intrusive dialog box, but you’ll know and can control how controls are created by XAML Power Toys.

Control Default Settings are now being saved in the installation directory so that you’ll never lose your settings again. This file is not replaced during a re-installation or during a Control Panel removal. You can also easily backup your settings.

Add-In Macro Security

For Visual Studio to discover XAML Power Toys, the XAMLPowerToys.Addin file must be in a path in the below dialog box.

This additional installation step is explained in the Installation and Setup video.

1.10 Add-In Macro Security

1.10 Add-In Macro Security

Downloads

More Information

This page is republished with permission from a blog post on Karl Shifflett’s blog, Karl on WPF.

Comments: 0

You must Login to comment.

About Anonymous

ertert

Featured Item

Microsoft Communities