WPF & Silverlight Grids – Faster Creation Using CodeRush Templates and a Custom Plug-in

A few days ago a customer asked for a faster way to create WPF and Silverlight grids. Rory Becker and I recorded a video showing how to create this feature in CodeRush. Rory and I discuss and build the feature in about 30 minutes.

Here’s the final version of the feature in action (the mnemonic is “g” followed by the dimensions of the grid, so “g2x3” creates a 2x3 grid):


In the video Rory and I show how we built this feature step-by-step. We create a template and add a custom plug-in to make the template more dynamic and intelligent. You can follow along with the video to create this yourself and learn about templates and plug-ins, or you can follow the download instructions below if you simply want the feature. Here’s the video (be sure to watch it through to the end – I added a video update where I improved the template to make it even easier to use):


Installing the Smart Grid Templates

  1. Right-click and download this Smart Grid templates link.
  2. Start Visual Studio.
  3. From the DevExpress menu, select Options.
  4. Inside the Editor folder, select the Templates options page.
  5. IMPORTANT: In the Language combo box at the bottom of the Options page, make sure XAML is selected:

  6. Right-click the template tree list and choose Import Templates….

    Import Templates
  7. Navigate to the folder where you downloaded the Smart Grid templates. Select XAML_SmartGrid.xml and click Open. The smart grid templates will appear inside the template tree list.

  8. Click OK to close the Options dialog.
  9. From the DevExpress menu, selection About…. The DXCore About box will appear.

  10. Click the Settings… button. A Windows Explorer window will appear.
  11. Navigate to the Settings.xml\Core folder inside Explorer.
  12. Download and save the Numbers dynamic list to this folder.
  13. Back on the DXCore About box, click the Plug-ins… button. This will open two more Windows Explorer windows (Bin\PlugIns and Community\PlugIns). Download and save the
  14. Download and unzip the CR_Loop binary to the Bin\PlugIns folder (latest CR_Loop source is here if you’re interested).
  15. Click OK on the DXCore About box.
  16. Restart Visual Studio.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.