다음을 통해 공유


Fall Roadshow followup

Northeast RoadshowWith the Windows 7 launch event in Boston, the Windows 7 Incubation Week, and Code Camp this past weekend, I’ve fallen woefully behind in my follow-up post to the last Northeast Roadshow… so behind in fact, that we’ve already announced the next series (see Chris’ blog).

Screencasts are still in the works, but my finalized presentation materials and sample code are available at the Roadshow’s Code Gallery site (check that site for screencasts in the next week or two):

7-Up (grade) Your Applications

.NET Chips – Tidbits from the CLR and C#

Following are the questions I jotted down to answer while on the road.  If I missed something, send me a note, and I’ll amend this post.

For Taskbar thumbnail buttons, can you expose different buttons on individual previews?

Simple answer, yes.  The buttons in my code sample are added via the following call to the Windows API Code Pack:

TaskbarManager.Instance.ThumbnailToolbars.AddButtons(childForm.Handle, btnSetBackground);

You can see the correlation there between childForm.Handle (the child/tab window for which the preview is being rendered) and the button (btnSetBackground).  So, based on some property of the individual childForm, perhaps the type of data or file it’s presenting, you could provide different sets of thumbnail buttons.

Windows API Code Pack Licensing

Not a question per se, but i discovered that the Windows API Code Pack is governed by a license different from MS-PL, which is the Microsoft ‘open-source’ equivalent license.  Be sure you check out the implications of using this code as part of your own projects.

Will managed wrappers for new Windows 7 features be part of the .NET Framework 4.0 (or beyond)?

Unfortunately, I don’t have a definitive answer on this one.  There’s no implication, one way or the other, about the inclusion of OS-specific capabilities in upcoming .NET Framework releases.  That said, .NET 4.0 does include modifications to WPF.  Specifically the UIElement and UIElement3D classes are being enhanced with events like TouchDown, TouchEnter, etc. to support multi-touch capabilities.

Is there a way to programmatically determine what items are currently in a Jumplist?

Nope.  Presuming you build the Jumplist from scratch on your own, you can keep track of most of what’s in it, but there’s still the issue that you can’t introspect the Pinned section or how many documents (and which) appear in the Frequent or Recent documents section.

The Ribbon and touch capabilities are not wrapped by the Windows API Code Pack, will they be?

They are on a list of features being considered for an upcoming release, but there’s no firm schedule for delivery at this point.

Are there syntax analysis tools to detect boxing conditions?

I HAVE NOT TRIED THE FOLLOWING, SO THIS INFORMATION SHOULD NOT BE CONSTRUED AS ENDORSEMENTS

Back in 2004, in Three Vital FX Rules John Robbins talked about FxCop and configuring custom rules, including one for boxing/unboxing.  I suspect that same logic could be applied in a custom rule to FxCop today.

There is a commercial tool, Total .NET Analyzer, which purports to detect boxing scenarios as well as other performance-related constructs like use of string concatenation versus StringBuilder.  Unfortunately, it appears that the last version shipped by FMS is for Visual Studio 2003.  

Parasoft’s .NET Quality Solution also includes static analysis tools, but I cannot confirm from the product description that boxing is specifically detected.  The analysis rules, are however, configurable.

If you’re using another tool or have other ways you’re handling static code analysis, please share it via a comment below.

Can I use CLR Profiler to analyze ASP.NET applications?

CLR Profiler Well, this amounted to a d’oh moment.  One look at the menu for CLR Profiler (left) answers the question.

To do so, CLR Profiler shuts down IIS, adds a few registry entries, restarts IIS and then prompts you to load the ASP.NET application of interest.