Copy Code in HTML format with Visual Studio 2010

Today Jason has announced the Visual Studio 2010 Productivity Power Tools – a set of VS 2010 extensions that we released to complement and enhance the built-in 2010 features. You can either install the Pro Power Tools from here or just go to the Tools –> Extension Manager and type "Pro Power Tools" in the…

23

A prototype WPF/Silverlight layout designer

I’ve been thinking recently about how would I write a WPF UI designer that would specifically highlight the new WPF layout paradigm, and not try to mimic the old WinForms paradigm. The old VB6/WinForms designer was built around absolute positioning. It allowed for rapid WYSIWYG prototyping of interfaces, and the Dock/Anchor functionality provided a relatively…

14

Visual Studio 2010 Beta 2 Known Issues – Part 2

This post continues my unofficial list of known issues in VS 2010 Beta 2 (see Part 1). As we continue getting Beta 2 feedback and investigating issues, it’s time for another update on the issues we’ve been seeing. Please keep in mind that due to the volume of the issues, I’m only mentioning the ones…

23

Saving images (.bmp, .png, etc) in WPF/Silverlight

I’ve recently added a new feature to Live Geometry that allows users to save the current drawing as a bitmap or a .png file. Just push the save button and pick the desired image format in the Save dialog: Fortunately, both WPF and Silverlight support saving full visual contents of any visual into a file…

10

First videos of the structured editor prototype

Disclaimer: the structured editor work described in my posts is unrelated to my work at Microsoft. Everything shown is my personal research done as part of my MSc thesis during 2004-2007. Also, it’s not ready for real use and does not cover all the features of even C# 1.0. It’s a concept prototype and work…

16

UI without code or XAML: PropertyGrid, DataForm, etc.

WPF has certainly advanced the state-of-the-art in programming the UI. I personally think that WPF and Silverlight remove all the limits that existed to UI development in the past. The only limit now is your imagination. XAML is there for declarative machine-friendly UI descriptions, data-binding is for easier logic of syncing the UI to the…

2

Calling new on an interface

Interesting thing: technically there is a way to call new on an interface to create an object. How? Using a feature in the C# compiler for COM-interop support: using System.Runtime.InteropServices; class Program { static void Main(string[] args) { IFoo foo = new IFoo(); } } class Foo : IFoo { } [ComImport] [Guid("DC1CB768-0BE5-4200-8D0A-C844BFBE3DE7")] [CoClass(typeof(Foo))] interface…

10

Samples for the Undo Framework

I just added some samples for the Undo Framework. You can find the samples in the source code or download them from the project website. MinimalSample First is a simple Console App sample called MinimalSample. Here’s the full source code: using System; using GuiLabs.Undo; namespace MinimalSample { class Program { static void Main(string[] args) {…

13

yield return and Continuation-Passing Style

Someone was recently porting some C# code to VB and had a question about how to convert the C# yield return iterator methods to VB (VB currently doesn’t support iterators). There were a lot of replies like “use Reflector on a compiled binary and copy-paste the generated state machine code”. The problem with the Reflector…

5

How to debug crashes and hangs

At my job on the C# IDE QA team I’ve learned some useful things about debugging in Visual Studio, which I’d like to summarize in this post. Although the screenshots were made using Visual Studio 2008 SP1, this pretty much applies to other versions of VS as well. Rich debugging support When you develop your…

40