Browse by Tags

Tagged Content List
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: Representing dependencies in code

    It is more often than you would suspect that people have to deal with some sort of dependencies in an application they're developing. In this post I'll talk about some common algorithms and data-structures to work with dependencies that might turn out helpful with some real-life programming tasks. To...
  • Blog Post: A curious subtlety about how CLR does interface dispatch on array types

    This post is about some internal CLR magic that usually makes accessing .NET arrays through an interface up to 100 times faster (if you're an optimist; or accessing arrays up to 100 times slower in the worst case, if you're a pessimist). I'm usually very curious about how this universe works under the...
  • Blog Post: Live Geometry with Silverlight 2

    I'm happy to announce a project I started on CodePlex: http://codeplex.com/DynamicGeometry Live preview at: http://geometry.osenkov.com Dynamic geometry In a nutshell, it's an interactive designer for ruler-and-compass constructions - it lets you plot points, connect them with lines, construct circles...
  • Blog Post: MEF: Microsoft's Managed Extensibility Framework

    Krzysztof Cwalina announced that Microsoft has released a CTP of its Managed Extensibility Framework (MEF) . MEF is basically a dependency injection framework that allows to provide extensibility for your applications (add-in/plug-in framework). Also, it's a very good way to componentize your application...
  • Blog Post: Testing

    If you're interested in testing or would like to learn more about it, here are a couple of links: MSDN recently announced Tester Center: http://msdn.com/testercenter - this is a centralized resource about testing from Microsoft. Quote: "The Microsoft Tester Center showcases the test discipline as...
  • Blog Post: Algorithms in C#: Connected Component Labeling

    I have to admit, I'm not very good at interviews. For some reason my mind isn't trained well for sorting linked lists or balancing binary trees on the whiteboard. I have no problem designing 600+ type hierarchies and building complex object-oriented frameworks, but typical interview questions were never...
  • Blog Post: How to determine the .NET installation directory and CLR version

    I recently discovered the System.Runtime.InteropServices. RuntimeEnvironment class, especially RuntimeEnvironment.GetRuntimeDirectory(). Also, RuntimeEnvironment.GetSystemVersion() gets the version of the CLR that is running the current process.
  • Blog Post: How to map a Visual Studio macro to a keyboard shortcut?

    The complete answer is here: http://msdn.microsoft.com/en-us/library/a0003t62.aspx Excerpt: Choose Options on the Tools menu to display the Options dialog box. In the Environment folder, click Keyboard. In the Show commands containing box, type "macros." Once you do this, all commands beginning...
  • Blog Post: Coding productivity: macros, shortcuts and snippets

    Visual Studio macros are a fantastic productivity booster, which is often under-estimated. It's so easy to record a macro for your repetitive action and then just play it back. Even better, map a macro to a keyboard shortcut. I'll share a couple of examples. InsertCurlies If you open up Visual Studio...
  • Blog Post: Did you know? Delegates to extension methods

    I didn't know about this until recently: You can take a delegate to an extension method as if it was an instance method: http://csharpindepth.com/ViewNote.aspx?NoteID=92 The delegate's target will be set to the instance. Nice!
  • Blog Post: Using delegates - a simple sample

    A while ago Charlie Calvert did a great job explaining delegates here . Readers were asking for more samples that would demonstrate the benefits of delegates. After a lot of hard thinking (somehow it's hard to find an easy sample!) I've come up with a simple sample which will hopefully demonstrate just...
  • Blog Post: How to: override static methods

    I know, I know. You can't override static methods. The title was just a trick to provoke your interest :-) In this post, I'll first try to explain why it is impossible to override static methods and then provide two common ways to do it. Or rather - two ways to achieve the same effect. So, what...
Page 1 of 1 (22 items)