.NET

General .NET code and thoughts

.NET source code?

Yeah, sure we all just use reflector anyway, but according to Scott Guthrie we'll be able to step into the source code of certain parts of the .NET framework with VS.NET 2008. "We'll begin by offering the source code (with source file comments included) for the .NET Base Class Libraries (System, System.IO, System.Collections, System.Configuration, System.Threading, System.Net, System.Security, System.Runtime, System.Text, etc), ASP.NET (System.Web), Windows Forms (System.Windows.Forms), ADO.NET (System.Data), XML (System.Xml), and WPF (System.Windows).  We'll then be adding more libraries in the months ahead (including WCF, Workflow, and LINQ).  The source code will be released under the Microsoft Reference License (MS-RL)." I can't even...

WPF Binding to RichTextBox.Document

I was getting some nice crashes on startup while trying to do some data binding to the Document property on RichTextBox under WPF and so I hit the net and found out that it's not possible. I quickly came up with the following code, which seems to work: class BindableRichTextBox : RichTextBox{    public static readonly DependencyProperty DocumentProperty = DependencyProperty.Register("Document", typeof(FlowDocument), typeof(BindableRichTextBox), new FrameworkPropertyMetadata(null, new PropertyChangedCallback(OnDocumentChanged)));     public new FlowDocument Document    {        get { return (FlowDocument)GetValue(DocumentProperty); }        set { SetValue(DocumentProperty, value); }    }     static void OnDocumentChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)    {        RichTextBox rtb = (RichTextBox)obj;        rtb.Document = (FlowDocument)args.NewValue;    } }...

Shifting technology

By day I've been a Winforms programmer for the last few years, but over the last few weeks I've found myself branching out. The first was to do a project with WPF, and there's going to be a slight problem going back to winforms now because WPF is so much better. Time to rewrite the main app I think (kidding!). The second thing I've been doing is coding a website using ASP.NET. It's not something I've done much of before, and it's meant a lot of database work as well which is something I haven't really done for years...

Looking a little further into XNA

There's a distinct relationship between how much I've got on at work and how much I feel like coding in the evenings and weekends, and that's not made much better by the nagging feeling that I could be spending my time writing useful utilities for work that I've been putting off instead of messing around with XNA, WPF or something else that's cool, interesting and worth blogging about. I have actually been doing a bit of XNA when the mood takes me, and that includes finally taking a look at the Racing Game starter kit. It's a fun enough game,...

Some serious Expression Blend suggestions

Here's a list of features I'd love to see added to expression blend: Maintain solution folders in the project view. Large solutions become a problem when you have loads of projects, especially when it means your unit test assemblies start to get mixed up with the application. Support the same path length as Visual Studio. I had a project fail to load in Blend that loads fine in VS.NET 2005 Don't make projects start as all expanded, or add a collapse all option. Make Expression Light the default theme, it looks a lot better than dark. I can't seem to...

PaulStovell.NET » Scenario Coverage Analyser for TFS

 One of the dirty little secrets of the side of the industry that I'm in is that I have to work with big companies who love these requirements things. You know the sort of thing, massive documents with lots of mentions of the word shall everywhere. In fact I've got one open at the moment that the customer wants traceability for, including a lovely thing called a traceability matrix. Now I'm using Team Foundation Server and that's great for traceability because I can do things like see what task a line of code was changed for and auditors love that kind of...

How to annoy a graphic designer who wants to design a UI prototype

If you really want to annoy a graphic designer who wants to design a UI prototype for an application to show you what he's on about (and also to test that whole code behind UI design for WPF idea they took from ASP.NET) then give them a copy of Expression Blend. You'll be amused for hours as they moan about how slow it is, how it doesn't seem to be even close to be being finished and how awful an advert for what you can do with WPF that black UI is. There's something about missing out so much of...

Scott Hanselman's Computer Zen - Refector 5 Released - World Domination Assured

From Scott Hanselman's Computer Zen - Refector 5 Released - World Domination Assured: Reflector 5 is out, and it is good. Go get it immediately, or just run your current version and go Help | Check for Updates. Reflector is one of the most useful tools out there for understanding what's going on with an assembly and so everybody upgrade immediately. Scott has a pretty good list of the new features that Lutz has added in his post, the key ones (for me) being the code:// protocol handler (that's going to be really useful!), and the new functionality in the Analyze section...

I don't miss not having a good XAML editor in visual studio

Over the weekend I was working on some WPF code and getting feelings of being back at basics because I was editing XAML by hand. This was mainly because the designer for VS.NET 2005 is slightly lacking in features but I have this feeling that I'm going to stick with the text editor even when I can drag and drop without any worries of strange things happening. The thing is that unlike Windows Forms, or especially Win32 dialogs, WPF really is straight forwards to write as text. Win32 dialogs were the closest, but they were a pain to do by...

Team Server is great, but only when it works

I know what my mistake was with Team Foundation Server: I installed the service pack. The install on the server seemed to go fine, but it broke the code analysis so that it couldn't run as part of the build. It worked from inside visual studio so I thought I'd do the simple fix of upgrading it to SP1 as well. Of course this is a really horrible install because it's 400MB in size, takes about a fortnight to run and pegs your box at 100% processor usage for much of this time. The biggest problem is that after a...

Full .NET Archive