Saturday, December 5, 2009

My Silverlight session at Microsoft TechDays Canada 2009

My Silverlight session at Microsoft TechDays Canada 2009


My Silverlight session at Microsoft TechDays Canada 2009

Posted: 05 Dec 2009 01:03 PM PST

This week I did a presentation at Microsoft TechDays Canada 2009 , it was a repro of the session that Jesse Liberty did at TechEd 2009 North America earlier this year: "What's New in Silverlight 3 ?" You can grab the slides and watch the video if you...( read more )...(read more)

Experiments using MEF, MVVM and Silverlight 4 Beta – Part 2: Custom attributes

Posted: 05 Dec 2009 05:00 AM PST

In the last post, I've used the new MEF framework available in Silverlight 4 Beta to build a simple MVVM sample exporting, importing and then composing the ViewModel object with the xaml View. As pointed by Glenn Block in his last blog post, it's...( read more )...(read more)

MVVM Light V3/alpha3 for Blend 3 and Blend Preview 4

Posted: 05 Dec 2009 01:06 AM PST

The project and item templates allowing you to create pre-wired MVVM Light applications are now also available for Expression Blend 3 and Expression Blend Preview for .NET 4 and Silverlight 4. The installation process is manual, but not difficult at all...( read more )...(read more)

My Interview about Silverlight at Sweden's OreDev

Posted: 04 Dec 2009 09:06 AM PST

URL : http://channel9.msdn.com/posts/buzzfrog/scottre... While in Sweden for OreDev, Microsoft pulled me aside to do a quick interview about Silverlight, Data and the reported death of WPF . Daniel Mellgaard Frost does a great job of asking me the tough...( read more )...(read more)

List(T).Find Method

Posted: 04 Dec 2009 05:25 PM PST

Improved code examples for Find, FindAll, FindIndex, FindLast, FindLastIndex methods for the generic List(T) Class. Demonstrates use of predicates for finding values using data in a sample XML file.

BugCamSmash Dissected part 1 – Smash a Bug

Posted: 04 Dec 2009 04:20 PM PST

When beginning the project that became BugCamSmash, I knew I was going to try and interact with the UI using the new webcam feature in some way. My first step then was to find a good method for hit detection as well as a good target to hit. Now normally...( read more )...(read more)

Inserting Silverlight DeepZoom images into your Web page

Posted: 04 Dec 2009 02:37 PM PST

An Overview of Deep Zoom Technology Deep Zoom Composer is a free application that creates either Silverlight or AJAX content that displays images in a fixed area on a web page. Users can pan and zoom within high-resolution images inside this area. In...( read more )...(read more)

Friday, December 4, 2009

More on medium trust: what permission are you missing?

More on medium trust: what permission are you missing?


More on medium trust: what permission are you missing?

Posted: 04 Dec 2009 10:51 AM PST

Yesterday, I asked some questions about your usage of medium trust . Thank you all for the great answers and comments (but don't read too much into that, I'm just playing with stuff). If you haven't answered yet, feel free to do so . Now I have an additional question: What missing permission is preventing you from running in medium trust? Please answer in comments. And thanks again for the great feedback. Read More......(read more)

Silverlight Cream for December 04, 2009 -- #748

Posted: 04 Dec 2009 08:24 AM PST

In this Issue: Jeremy Likness , CLR Team Blog , Deborah Kurata , Tim Heuer , Ning Zhang , Jeff Prosise , Fredrik Normén , Antoni Dol , Adam Kinney , Jordan Knight , Andy Beaulieu , Kevin Dockx , and Al Pascual . Shoutouts: Jonathan van de Veen discusses...( read more )...(read more)

How important is medium trust to you?

Posted: 03 Dec 2009 09:05 PM PST

I would be very grateful if you could drop me a note in comments answering the following questions: Do you run all, some or none of your web sites in medium trust? Why do you choose to run in that trust level? Are your sites externally hosted and if so does your hoster constrain the trust level? Don't read anything into this, I'd just like to see some different opinions on medium trust. Read More......(read more)

Silverlight Cream for December 03, 2009 -- #747

Posted: 03 Dec 2009 09:07 PM PST

In this Issue: Pete Brown , Davide Zordan ( 2 ), René Schulte ( 2 ), David Anson , Ning Zhang , Jeff Prosise , Antoni Dol , nmarun , Deborah Kurata ( 2 ), and Fredrik Normén . Shoutouts: John Papa announced the availability of his "What's new in Silverlight...( read more )...(read more)

Caliburn Silverlight Navigation Walkthrough: Introduction

Posted: 03 Dec 2009 07:08 PM PST

Over the next several months I am going to be releasing various starter kits/samples for Caliburn. Each sample will demonstrate a different application style. I've factored each sample so that it has a reusable mini-framework, allowing developers...( read more )...(read more)

Silverlight 4 – Sharing Assemblies with .NET Applications

Posted: 03 Dec 2009 03:34 PM PST

This one's just a link but an important link for anyone who's heard that you can share assemblies between the Silverlight CLR and the full .NET desktop/server CLR. The CLR team has a blog post with the details; Sharing Silverlight Assemblies with .NET...( read more )...(read more)

Explore How to Build Solutions on SharePoint 2010

Posted: 02 Dec 2009 04:43 PM PST

See how SharePoint 2010 is a major step forward as a development platform. Learn how SharePoint 2010 provides the business collaboration platform for developers to rapidly build solutions using familiar tools such as Visual Studio 2010 through this self-paced course.

New - Microsoft Silverlight 1.0: An SDL Implementation Story

Posted: 02 Dec 2009 04:43 PM PST

Learn how the Microsoft Silverlight team met and exceeded the Security Development Lifecycle (SDL) requirements for every phase of the Silverlight 1.0 release.

Thursday, December 3, 2009

Bug in the Create DomainService wizard

Bug in the Create DomainService wizard


Bug in the Create DomainService wizard

Posted: 03 Dec 2009 02:03 PM PST

In a previous blog post I documented an undocumented breaking change in the DomainService wizard. It turns out that it is really a bug. When you create a DomainService using the July .NET RIA Services you would get an update that looks like this: public Read More......(read more)

To Share or Not to Share

Posted: 03 Dec 2009 01:22 PM PST

One of the really interested puzzles that occurred to me with the release of SL4 and the VS2010 version of WCF RIA Services is what the new ability of .NET 4 to reference SL4 code libraries means to the WCF RIA Services shared file feature. My thinking Read More......(read more)

BugCamSmash – Motion Detection with Silverlight 4 Beta

Posted: 03 Dec 2009 10:07 AM PST

At PDC09, we released Silverlight 4 Beta and announced one of the availability of, one of the most requested features, Web Cam Support. Wanting to have fun with the new feature, I thought of a fun sample to create – smashing bugs with motion detection...( read more )...(read more)

Microsoft Surface Manipulations and Inertia Sample for Silverlight available for download

Posted: 03 Dec 2009 10:00 AM PST

Just to point out this [awesome!] download available from the Microsoft Surface team, intended only for educational purposes. From the main site: "Multitouch support in Windows 7 allows applications to blur the lines between computers and the real...( read more )...(read more)

Live IntelliSense in WCF RIA Services for VS2010

Posted: 02 Dec 2009 08:27 PM PST

Live IntelliSense is one of the new features added into WCF RIA Services PDC release on VS2010. It enables no-build experience to get IntelliSense support on the client project for business objects defined in the server project. As we know, IntelliSense Read More......(read more)

The Data Source Window Support in WCF RIA Services

Posted: 30 Nov 2009 09:12 PM PST

WCF RIA Services Beta was announced at PDC09 one week ago. It contains a lot of runtime support to make the experience of building a web business application much easier using Silverlight. Besides, there are also some tooling supports to help developers Read More......(read more)

Lazily Loaded Hierarchical Data Trees

Posted: 30 Nov 2009 02:35 PM PST

In the last post in this series, I explored using WCF RIA Services to load a set of entities from a self-referencing, hierarchical table in the database, and display the items in a Silverlight TreeView. In this post, we'll introduce a lazy loading scheme Read More......(read more)

Subclassing Shape (or more accurately, Path)

Posted: 02 Dec 2009 06:29 PM PST

One of the more subtle improvements in Silverlight 4 is that we unsealed the Path class. That means you can write a class that behaves like a shape without re-implementing properties like Fill, Stroke, etc. -- just subclass, set Path.Data to render what...( read more )...(read more)

IIS Smooth Streaming with the Apple iPhone

Posted: 02 Dec 2009 06:46 PM PST

At PDC09 two weeks ago, Scott Guthrie announced that the next release of IIS Media Services will deliver adaptive streaming video to the Apple iPhone. If you haven't seen the demo, you can check the preview out by going to www.iis.net/iphone on...( read more )...(read more)

Have you checked out the new RichTextArea control?

Posted: 02 Dec 2009 05:47 PM PST

Silverlight 4 Beta includes a new RichTextArea control. RichTextArea enables you to display or edit rich content and has features like: displaying hyperlinks displaying inline images or other UIElements like a Button Read-only mode Selection APIs Formatting...( read more )...(read more)

Component of .Net CF--TCP/UDP

Posted: 22 Jan 2009 08:42 PM PST

This is a ClassLibrary of several ways to Control SQL in C#,you can import it to your project and control the SQL nice and easy.
It will save your time to build the new,same database access level.

*Welcome to help us to improve it !We will reply you as soon as we can!

Silverlight Cream for December 02, 2009 -- #746

Posted: 02 Dec 2009 03:25 PM PST

In this Issue: Shawn Wildermuth , Andrej Tozon , Mark Monster , AfricanGeek , Allan Muller , nmarun , David Anson , Jesse Bishop , Fredrik Normén , Alan Mendelevich , and Laurent Duveau . Shoutout: The Thirsty Developer posted a new PodCast last week...( read more )...(read more)

PDC and Tech-Ed Europe Slides and Code

Posted: 02 Dec 2009 02:41 PM PST

I spent close to three weeks on the road giving talks at Tech-Ed Europe (Berlin), PDC (Los Angeles), and the Los Angeles Code Camp (Los Angeles). I got to talk about two topics that I am very passionate about: ASP.NET MVC and Ajax. Thanks everyone for coming to all my talks! At PDC, I announced all of the new features of our ASP.NET Ajax Library. In particular, I made five big announcements: ASP.NET Ajax Library Beta Released – You can download the beta from Ajax.CodePlex.com ASP.NET Ajax Library includes the AJAX Control Toolkit – You can use the Ajax Control Toolkit with ASP.NET MVC. ASP.NET Ajax Library being contributed to the CodePlex Foundation – ASP.NET Ajax is the founding project for the CodePlex Foundation (see CodePlex.org) ASP.NET...(read more)

Balder 0.8.9.0 - features, feedback wanted

Posted: 02 Dec 2009 01:23 PM PST

We're not about to slow down the development of Balder anytime soon, next release is something we're already hard at work with. If you want to be influence the priority or have features you'd love to see in it thats not already on the list...( read more )...(read more)

Balder Logo + Tutorials

Posted: 02 Dec 2009 01:01 PM PST

On monday (30th of November 2009) we had a new release of Balder, version 0.8.8.0. Since then I've been busy getting tutorials up on the site for not only the new stuff but also covering usage in general. All the tutorials are available here . Also...( read more )...(read more)

Wednesday, December 2, 2009

T4CSS: A T4 Template for .Less CSS With Compression

T4CSS: A T4 Template for .Less CSS With Compression


T4CSS: A T4 Template for .Less CSS With Compression

Posted: 02 Dec 2009 01:07 PM PST

Pain is often a great motivator for invention, unless you become dull to the pain. I think CSS is one of those cases where there's a lot of pain that we as web developers often take in stride. Fortunately not everyone accepts that pain and efforts such as LESS are born. As the home page states: LESS extends CSS with: variables, mixins, operations and nested rules. Best of all, LESS uses existing CSS syntax. This means you can rename your current .css files .less and they'll just work. LESS solves a lot of the pain of duplication when writing CSS. Originally written as a Ruby gem, Chris Jowen ported a version to .NET not surprisingly called .less . Here are some examples from the .less homepage: .Less implements LESS as an HttpHandler you add...(read more)

Silverlight 4 – Credentials, we’ve got it!

Posted: 02 Dec 2009 11:21 AM PST

I've been writing on Credentials in context of Silverlight for some time now. I didn't like the options that were available to secure services and allow integration with Silverlight. For some history search for "credentials" on my blog. July 2008 – Silverlight...( read more )...(read more)

Hacking the ASP.NET Parser

Posted: 01 Dec 2009 01:09 AM PST

A while ago I blogged about using external templates in an asp.net application. The problem with that was it wasn't natively supported, so I had to create a derived SpecialRepeater in order to take advantage of the external template system. In this latest parser hack I've managed to "trick" the asp.net parser into letting me declaratively set any template property to be a virtual path in order to load a user control into that template at runtime. How it works The ASP.NET compliation system is pretty complex. There are all kinds of extensibility points, including BuildProviders, PageParserFilters, ControlBuilders, ExpressionBuilders and the list goes on. One unknown *feature* of the parser is it's ability to generate code from something called...(read more)

Create a Silverlight Europe weather map

Posted: 02 Dec 2009 04:16 AM PST

.csharpcode-wrapper, .csharpcode-wrapper pre { background-color: #f4f4f4; border: solid 1px silver; cursor: text; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px 0px; max-height: 200px; overflow...( read more )...(read more)

Opening up Silverlight 4 Navigation: Introduction to INavigationContentLoader

Posted: 30 Nov 2009 12:37 AM PST

So, if you haven't noticed by now (or been following my previous blog posts), I happen to really enjoy exploring the Navigation feature in Silverlight.  A while back, I posted a number of workarounds and tips for some desirable scenarios using the...( read more )...(read more)

PDC09: ASP.NET MVC 2: Ninjas Still on Fire Black Belt Tips

Posted: 02 Dec 2009 01:04 AM PST

While I was at PDC last week in Los Angeles I got to present an ASP.NET MVC 2 presentation. Phil has been home playing with his new baby so I was thrilled to be able to give a presentation on his behalf. I gave the talk immediately after the Day 2 keynote a few minutes after they announced that they were giving all attendees custom laptops. This talk was a (virtually) no slides, just demos talk. I showed some new ASP.NET MVC 2 features, some tips and techniques that aren't/weren't ASP.NET MVC 2 specific. I also mentioned some community projects that are doing some cool things in the ASP.NET MVC space like MVCContrib and MVCTurbine . You can watch the HD version of the talk using Silverlight Smooth Streaming 1280x720 here or the non-HD...(read more)

Zag Studio’s web site

Posted: 01 Dec 2009 11:31 PM PST

Zag Studio's web site is now online! I plan to keep expanding the site with information that my clients and prospective clients find useful, so if there's anything you would like to see there, let me know. The Silverlight banner in the main...( read more )...(read more)

Hanselminutes Podcast 188: ASP.NET MVC 2 Beta with Phil Haack

Posted: 02 Dec 2009 12:13 AM PST

My one-hundred-and-eighty-eighth podcast is up . This last week I was at PDC but just before he left I chatted with Phil Haack about his exciting release of ASP.NET MVC 2 Beta. They chat about the changes, and Scott gets a surprise phone call from The Gu . Subscribe: Download: MP3 Full Show Do also remember the complete archives are always up and they have PDF Transcripts , a little known feature that show up a few weeks after each show. Telerik is our sponsor for this show. Check out their UI Suite of controls for ASP.NET . It's very hardcore stuff. One of the things I appreciate about Telerik is their commitment to completeness. For example, they have a page about their Right-to-Left support while some vendors have zero support, or don't...(read more)

Hanselminutes Podcast 186: .NET Debugging 101 with Tess Ferrandez

Posted: 02 Dec 2009 12:06 AM PST

My one-hundred-and-eighty-sixth podcast is up . I was in Sweden a few weeks and sat down with master debugger and ASP.NET Escalation Engineer Tess Ferrandez . She explains .NET Debugging 101. What's a dump file? Do you need PDBs? How do you use WinDBG and what are the best ways to debug memory issues, perf problems and hangs. Also check out video of Tess up on Channel 9 as she walks me through new debugging features in VS2010 . Subscribe: Download: MP3 Full Show Do also remember the complete archives are always up and they have PDF Transcripts , a little known feature that show up a few weeks after each show. Telerik is our sponsor for this show. Check out their UI Suite of controls for ASP.NET . It's very hardcore stuff. One of the...(read more)

Rocky Mountain Tech Trifecta v2.0 Registration Open

Posted: 01 Dec 2009 06:12 PM PST

Registration has now opened for this years Rocky Mountain Tech Trifecta.  This years all day event will be Feb 27th in Denver, Colorado at  Metro State College Denver.  If your not in Colorado – Don't stop reading yet – last year we had...( read more )...(read more)

64-Bit Programming with Visual C++ (Visual C++ 2008)

Posted: 01 Dec 2009 05:20 PM PST

This section discusses how to target 64-bit hardware with the Visual C++ build tools. Topics describe how to configure projects to target 64-bit platforms, and how to enable a 64-bit toolset at the command line. Other topics discuss common 64-bit migration issues, and Itanium and x64 software conventions.

Silverlight Team Twitter List

Posted: 01 Dec 2009 05:06 PM PST

Last week I wrote about the new Silverlight MVP Twitter list I created to make it easier to follow all of the Silverlight MVPs and the evangelists. You can follow the entire group using this link: www.twitter.com/john_papa/SilverlightMVP   I also...( read more )...(read more)

Pete Brown on Silverlight and WPF Convergence

Posted: 01 Dec 2009 03:37 PM PST

Great post from Pete over here about Silverlight/WPF convergence; "The Future of Client App Dev: WPF and Silverlight Convergence" It's funny as someone asked me just yesterday what my view was about Silverlight/WPF post-PDC and in the light of Silverlight...( read more )...(read more)

First experiments using MEF, MVVM and Silverlight 4 Beta

Posted: 01 Dec 2009 01:12 PM PST

MEF (Managed Extensibility Framework) is a new library available in Silverlight 4 Beta which permits to build applications that can be incrementally extended in a declarative way using three simple concepts (read this post by Glenn Block for more infos...( read more )...(read more)

/GL and PGO

Posted: 01 Dec 2009 11:02 AM PST

Hi, I'm Lin Xu, a Program Manager working on the C++ compiler.

Recently, we collated performance numbers from our testing passes over this release cycle. We track many different benchmarks closely for all of the architectures and switch options (/O1, /O2, /GL, /PGO). We also track these across multiple CPU models. (Yes, this is quite a big matrix. Look for an upcoming blog post from the QA team to learn more.)

We're pretty excited about the improvements we made for this release in code quality. (Read Ten's recent post about it here) As I looked at the numbers, one thing jumped out at me: To really take advantage of these improvements, applications need to be compiled with /GL, and PGO, if possible.

If you aren't familiar with PGO, you can read Lawrence's blog post on Profile Guided Optimization here.

I've summarized some of our data comparing VS2010 Beta2 with VS2008 SP1.0. Here is a comparison between integer benchmark performance with various switches on x86 and x64:

These particular graphs are based on a benchmark suite similar to SPEC CPU 2006. But our benchmarks include real world code as well. We build and measure performance of many Microsoft products, including SQL, Windows and Office.

 Let's say you currently build release builds with the /O2 switch in VS2008. If you moved to VS2010, you might see on x64:

·         10% faster code if you turned on /GL,

·         16% faster code if you turned on /GL and PGO

and on x86,

·         7% faster code if you turned on /GL,

·         13% faster code if you turned on /GL and PGO.

Now, for the last couple of releases, a new VC++ project will have /GL on for release builds. However, settings for upgraded projects are not changed. So whether you use the Visual Studio build system or your own custom build system, go ahead and check that you are specifying /GL for your release builds!

 The other recommendation I have is to use PGO. Doing so requires a larger investment (it requires you to figure out scenarios and create training data) – but it can improve the performance of your app above and beyond /GL. PGO works best on medium or larger applications. Small applications may see little benefit from PGO, depending on the application's workload.

We recently created training data and turned on PGO for part of the C++ intellisense engine in Visual Studio 2010 and saw ~25% better performance on some scenarios. When we turned on PGO for the compiler, we measured ~10% speedup in compiler throughput. Again, you can learn about how to turn on PGO in your own builds in Lawrence's blog post here.

/GL shouldn't increase your build time significantly, but note that /GL is not compatible with Edit and Continue (/ZI) and incremental builds (the linker option /INCREMENTAL). You can read some quick tips about /GL in another previous blog post here.

As Lawrence describes in his blog post, with PGO your application is built twice – once for the instrumented build and once for the final optimized build. This means build times increase more significantly, as but as I've noted above, the performance increase is also more significant.

So, if your application is CPU bound, I hope that these numbers will convince you to take a second look at your release build settings and turn on /GL and PGO!

 

Tuesday, December 1, 2009

The Future of Client App Dev : WPF and Silverlight Convergence

The Future of Client App Dev : WPF and Silverlight Convergence


The Future of Client App Dev : WPF and Silverlight Convergence

Posted: 01 Dec 2009 01:51 PM PST

Silverlight has come an amazing distance since the initial 1.0 release and 1.1 alpha (controls? who needs controls?) just over two years ago. It's hard to believe that we're on Silverlight 4 in such a short time. It's even harder to believe that each...( read more )...(read more)

Having fun with Silverlight 4 Beta and the Speech APIs

Posted: 01 Dec 2009 01:09 PM PST

Silverlight 4 Beta is now available, one of the more interesting features is the ability to use Late Binding for automation APIs via the new dynamic keyword and the ComAutomationFactory class. A great example is already available on the official http...( read more )...(read more)

My Take on Brad Abrams' PDC RIA Services Talk.

Posted: 01 Dec 2009 03:31 AM PST

I've been looking at RIA Services for a long time now. I had the lucky pleasure of being given early access to the bits for what was then called "Alexandria". As most readers of this blog have read, I have had some issues with how RIA Services works....( read more )...(read more)

Silverlight Cream for November 30, 2009 -- #745

Posted: 30 Nov 2009 10:03 PM PST

In this Issue: Shawn Wildermuth , Beth Massi , Fredrik Normén , Deborah Kurata , Jesse Bishop , Laurent Duveau ( 2 ), David Yack , Tim Heuer , and Jeff Handley . Shoutouts: Andy Beaulieu has a beta of a new game up: Froggy Math . He's looking for comments...( read more )...(read more)

Creating a Pinball Game in Silverlight

Posted: 30 Nov 2009 05:57 PM PST

My Coding4Fun tutorial on " Creating a Pinball Game in Silverlight " is now available! Some time ago, Brian Peek and the Coding4Fun team asked if I could create a tutorial on game programming, and we settled on a pinball game using the Physics Helper...( read more )...(read more)

Windows 7 Sensor and Location Platform Overview

Posted: 30 Nov 2009 04:01 PM PST

Join Dan Polivy, Gavin Gear, product team PMs, and Yochay Kiriaty, Technical Evangelist, as they explain the Windows 7 Sensor and Location platform, the underlying architecture, and how developers can take advantage of this new and exciting platform.

Dive into Office 2010 Beta Workshop

Posted: 30 Nov 2009 04:01 PM PST

Discover how Office 2010 Beta is a broadly extensible platform for building information worker productivity solutions and see how developing for Office with Visual Studio 2010 makes this easy. See online presentations with demos to introduce you to the core concepts and tools.

There's an App for THAT?!

Posted: 30 Nov 2009 03:34 PM PST

Let it be known that the game previously known as "Froggy Math" is now known as " Wormy Math " "Why" you ask? It only figures that with all of the Flash, Silverlight, and Mobile games being created every day that there would be some overlap in ideas and...( read more )...(read more)

Silverlight 4 Training Montreal in December

Posted: 30 Nov 2009 03:20 PM PST

The Silverlight Tour is coming back to Montreal next week, and we already have Silverlight 4 content!!! When: December 07-09 Where: Montreal, Qc Registration (Fr): http://www.runatserver.com/SilverlightTraining.aspx If you are looking for 3 days of intensive...( read more )...(read more)

MVVM Light Toolkit V3 Alpha 3 for WPF4/SL4

Posted: 30 Nov 2009 02:56 PM PST

I just published the latest alpha version of the MVVM Light Toolkit . I will post more about the new features in this alpha version, but the most exciting is probably that with this release, the MVVM Light Toolkit works in Windows Presentation Foundation...( read more )...(read more)