Home » Blog

rounded header

What’s new in Web Workbench 3.2

tag icon Tagged as Web Workbench

We’re pleased to announce a shiny new update to Web Workbench, our Visual Studio extension for Sass, Less and CoffeeScript. You can find it in your Visual Studio Extension Manager Updates tab right now. This is a big release for CoffeeScript fans so grab your favouried caffeinated beverage and let’s dive in!

CoffeeScript 1.3

Web Workbench 3.2 includes CoffeeScript 1.3, the latest update to the popular scripting language. CoffeeScript 1.3 includes a number of new safety checks — in particular it now enforces all JavaScript ‘strict mode’ early syntax errors at compile time. So if you can’t get imagine living without old-style octal literals, you’re in for a hard time. The rest of us can enjoy improved confidence in our code!

Find out more about CoffeeScript 1.3 here.

Iced CoffeeScript

Iced CoffeeScript adds two keywords to CoffeeScript, await and defer, to simplify asynchronous programming. Async programming is obviously immensely important in the Web environment where your page is likely to be communicating with network resources, and as C# programmers are learning, language support can make it so much easier! To use Iced CoffeeScript instead of normal CoffeeScript, go into Web Workbench Settings and check the “Use Iced CoffeeScript” checkbox.

Learn more about Iced CoffeeScript here.

CoffeeScript file combining

In the last update we added JavaScript and CSS file combining, and now we’ve brought that to CoffeeScript too! Go into Web Workbench Settings to choose the files you want to import, and we’ll do the rest!

And lots more

Also in this release are Chirpy compatibility fixes, several minor language fixes and command line compilers (separate download for Pro edition customers only).

Web Workbench 3.2 is available in the Visual Studio Gallery now. Check it out!



Customize the font list in the Silverlight HTML Editor

One of the controls you’ll find in our Silverlight Elements control suite is the HTML Editor. This provides a familiar UI for users to edit rich text which can later be encoded in HTML. The latest feature we have added to this control is support for developers to change the list of fonts displayed in the font selector. By default, the font selector displays all the fonts supported by Silverlight as seen in this image.

Default Fonts

Now you can specify additional fonts that the user can use as long as they are installed on the users machine. Below you can see I have set the list to contain most of the default fonts along with Gigi, Jokerman, Magneto, Quartz MS and the Precursor Alphabet from the Jak and Daxter video game which I happened to have installed.

Custom Font List

To specify the list of fonts available to the user, all you need to do is set the FontFamilies property on the StandardRichTextEditorToolBar. Here is the code I used to create the above screenshot.

IList<FontFamily> fontFamilies = new List<string>
{
    "Arial",
    "Calibri",
    "Cambria",
    "Candara",
    "Consolas",
    "Corbel",
    "Courier New",
    "Georgia",
    "Gigi",
    "Jokerman",
    "Lucida Sans Unicode",
    "Magneto",
    "Precursor Alphabet",
    "Quartz MS",
    "Segoe UI",
    "Times New Roman",
    "Trebuchet MS",
}.Select(s => new FontFamily(s)).ToList<FontFamily>();
 
ToolBar.FontFamilies = fontFamilies;

This property is available right now through the current nightly builds which you can download here if you have the trial version, or go to your account page if you are already a customer. If you have any questions or feature requests regarding the Silverlight HTML Editor, we’d love to hear from you in the forum!



April + Mega Pack + Half Price = Win

tag icon Tagged as MegaPack, News

April 2012 Mega Pack Sale

What’s good about April? Four day weekend; chocolate in rabbit format (!?); and a massive sale at Mindscape!

To spice this month up a bit we’re doing 50% off the Mega Pack, normally priced at $999 USD, but until the end of April you can get it for just $499 USD.

Five reason’s why the Mega Pack is awesome:

  • You get all 9 amazing Mindscape developer tools worth thousands, at a great price
  • Included are 12 months of updates, new releases and nightly builds
  • Mindscape products are designed to save you time and improve your productivity
  • New products released for the duration of your subscription are added free of charge
  • It’ll help you be the best developer you can be
Even better, if you want to go for the source code, team licenses or site licenses too, these also receive the half price discount!

So head on over to the sale page, grab your discount code and make it a productive April!

 

 



Building Twitter Bootstrap with Web Workbench

tag icon Tagged as Web Workbench

Less is a handy productivity language for Web developers, allowing you to almost elimininate duplication from your CSS while still being familiar to CSS developers. It’s even won the love of Twitter, whose Bootstrap library is a popular starting point for modern Web site designers.

Web Workbench is our Visual Studio integration package for Web productivity languages and it includes Less, so you can use it to work with Twitter Bootstrap from source. However, there are a couple of subtleties so I thought I’d walk you through the process.

Include the Twitter Bootstrap Less files in your project

This is about as exciting as a not very exciting thing. Download the Twitter Bootstrap source, unzip it, copy the files to your project folder and use Include In Project to add them to your project.

Choose the compilation settings

You’ll normally want to compile only the Bootstrap.less file. The other .less files get imported into Bootstrap.less and generally can’t be built separately. So go into Mindscape > Web Workbench Settings, and turn off Compile for everything except Bootstrap.less.

(Yes, we know this would be less boring if we had multiple selection or a ‘turn off for all’ button. We hear you!)

Note that Less compilation is available only in Web Workbench Pro. If you’re using the free edition of Web Workbench, you’ll get highlighting and intellisense, but you’ll need to upgrade or use a separate compiler to generate the CSS.

Force a recompile

Web Workbench detects when compilation settings have been changed and recompiles. However since you haven’t changed the setting for Bootstrap.less, just left it as it was, Web Workbench may not pick up that it needs to compile Bootstrap.less right now. In that case, just uncheck and recheck the Compile box, then click Save or Save All to force the recompile.

Enjoy your shiny new CSS file!

Web Workbench performs the compilation in the background so it may take a couple of seconds, but before too long you will see a pair of shiny new CSS files appear in your Solution Explorer:

You can now use these CSS files in your project to make your Web site look awesome!

Compilation error?

Twitter Bootstrap requires Less 1.3, which means you need an up-to-date build of Web Workbench. If you get a compilation error, go to Extension Manager and check what version you have installed. You need build 20062 or above. If you have an earlier build, go to the Extension Manager Updates tab to download a more recent one (it may show a “No updates found” message for a few seconds, so be patient!).

Editing the Bootstrap files

When you dive into editing the Twitter Bootstrap .less files, you may see warnings from Web Workbench telling you that a variable or mixin is unknown. This probably means the required declaration isn’t @import-ed into the file you’re editing; instead, Bootstrap.less will import the declaration before it imports the file you’re editing. For example, the wells.less file uses the .border-radius and .box-shadow mixins from mixins.less, but it doesn’t @import mixins.less. So if you edit wells.less, you’ll get blue squigglies on those mixins:

Although these warnings are benign, they’re annoying, and they risk hiding genuine mistakes, for example if you mistype .border-rdiaus. To address this, you can tell Web Workbench that you expect other files to be imported alongside this one, so it can assume those files are available even though they’re not @import-ed, by using a specially formatted ‘ww-expect’ comment: //* ww-expect "other-file.less". Note the * immediately after the // and the quotes around the filename.

(We’re working on a friendly user interface for this, but for now you need to use the comment.)

Bootstrap yourself in

In this post we’ve seen how to compile Twitter Bootstrap using Web Workbench, and how to tell Web Workbench about dependencies so that you can avoid spurious warnings when editing the Bootstrap files. Bootstrap is a great toolkit and we reckon Web Workbench is a great way to work with it — check it out!



Nightly news, 6 April 2012

By the time you read this, we’ll be off enjoying the long weekend, so consider this a message from the dusty past about that great question of the day: what’s new in this week’s nightly builds.

LightSpeed

  • If you’ve got an aggregate in a where clause on a grouping statement, we can now translate that to a HAVING clause on the SQL query
  • Fix for an issue where the same association is declared in multiple leaves of a STI hierarchy with different reverse associations
  • Clearer error message when a DiscriminatorAttribute has no Attribute value
  • Improved support for expressing properties of SQL Server 2008 spatial types in queries. We’ve also made some improvements around SqlDouble to Double conversion.
  • Fix for error when several threads raced to be the first to execute the same LINQ query, and the LINQ query involved a closure
  • Fixed an issue where a full text search could return an incorrect result if the text search returned a single hit, and that entity was already in the identity map, and there was a QueryExpression filter in addition to the full text search, and the entity in the identity map didn’t conform to the QueryExpression filter. I hope you’re paying attention to this, because there’ll be a quiz later.
  • Initial support for generic entity types, which allow you to use the same utility entity type (such as Permission or AuditRecord) in associations with multiple kinds of other entities
  • You can now specify a DisconnectedDisplayNamedStrategy on ValidationContext for use on entities which are not part of a unit of work

WPF Elements

  • DataGrid automatic column sizing and star sizing
  • Support for read-only columns when using a DataTable as the ItemsSource of a DataGrid
  • Added DataGrid.HighlightedItem property and associated change event and method
  • Added DataGrid.RowHeaderTemplate so you can control the appearance of row ‘headers’ (those little doodads at the left of each row. You know). You can use this for things like row numbering.
  • DataGridWrapper now has a property for retrieving the encapsulated DataTable
  • Fixed an issue with rendering of the DataGrid frozen column shadow
  • We now re-render charts when the Series collection changes
  • Added IsSliderVisible option to show sliders on chart axes for panning and zooming. You can also style the sliders using the (wait for it) SliderStyle property.

Web Workbench

  • Fix for Less compiler error is the file name or containing folder contained a single quote

NHibernate Designer

  • Added ‘formula’ option for entity properties computed in SQL
  • Added support for one-way associations
  • Added DataMember options for one-to-many associations

You know the drill — free editions from the Downloads page, full editions from the store. Enjoy!



Data Products Visual Controls Community Store
LightSpeed ORM
NHibernate Designer
SimpleDB Tools
SharePoint Tools
WPF Elements
WPF Diagrams
Silverlight Elements
Forums
Blog
Register
Login
Subscribe to newsletter
Buy Now
My Account
Volume Discounts
Purchase Orders
Contact Us