Tag Archives: WPF

MUST HAVE: XAML Power Toys

Depending on how many blogs you read, you’ll be seeing a barrage of “Silverlight 2 released” posts today.  If you haven’t seen it already, make sure you check Scott Guthrie’s post about the release at http://weblogs.asp.net/scottgu/archive/2008/10/14/silverlight-2-released.aspx

Karl Shifflet just updated his XAML Power Toys to support the Silverlight 2 release.  If you are doing any WPF or Silverlight development, then I HIGHLY RECOMMEND downloading the power toys.  They greatly enhance the developer experience inside of Visual Studio.  Here’s the first paragraph from Karl’s page:

“XAML Power Toys is a Visual Studio 2008 SP1 Multi-AppDomain Add-In that empowers WPF & Silverlight developers while working in the XAML editor.  Its Line of Business form generation tools, Grid tools,  DataGrid and ListView generation really shorten the XAML page layout time.”

FOLLOW UP: Developer Dinner on .NET Framework 3.5 SP1

Thanks to everyone who attended!  You can download the deck and links to the code here:

http://cid-1f72da7294089597.skydrive.live.com/embedrow.aspx/Public/NETFX3.5SP1

Normally, I make my actual demo code available for download.  However, this time around, my demo code was based on the .NET 3.5 Enhancements Training Kit.  I blogged about it here:

http://blogs.msdn.com/devkeydet/archive/2008/08/18/free-training-on-net-framework-3-5-sp1-and-asp-net-mvc.aspx

The kit has everything I showed in my demos and more!  I also promised to link to a bunch of good content out there on the various topics.

General

MSDN -> Data Platform Development

“How Do I?” Videos — Data Platform Development

ADO.NET Entity Framework

MSDN Library -> ADO.NET Entity Framework

ADO.NET Team Blog

Entity Framework Design Blog

Sample provider for Oracle

Third Party Provider Support for the Entity Framework RTM

Updated Entity Framework Samples for RTM

ADO.NET Data Services

MSDN Library -> ADO.NET Data Services Framework

MSDN -> ADO.NET Data Services

ADO.NET Data Services Team Blog

https://channel9.msdn.com/tags/UK/ Has a bunch of GREAT screencasts from Mike Taulty.

ASP.NET Dynamic Data

MSDN Library -> ASP.NET Dynamic Data

http://www.asp.net/DynamicData/

David Ebbo’s blog (Dynamic Data and other ASP.NET topics)

WPF

http://windowsclient.net/wpf/default.aspx

What’s New in .NET Framework 3.5 Service Pack 1 (for WPF)

WPF DataGrid CTP Preview (Video)

cheat-sheet to some of the WPF 3.5 SP1 features..

WPF Control Toolkit (DataGrid CTP)

WCF

New WCF Features in 3.5 SP1

WCF Tools in VS2008 SP1: Introducing the new features and enhancements

WPF Datagrid & the WPF Toolkit

In addition to releasing the .NET Framework 3.5 SP1 last week, which included a number of improvements to WPF, the WPF Codeplex site went public.  This site is the home for the WPF Toolkit and WPF Futures.

From the site:

"The WPF Toolkit is a collection of WPF features and components that are being made available outside of the normal .NET Framework ship cycle. The WPF Toolkit not only allows users to get new functionality more quickly, but allows an efficient means for giving feedback to the product team. Many of the features will be released with full source code as well.  The Toolkit Roadmap outlines some of the upcoming features we have planned."

"WPF Futures includes sample controls and features, many of which are being considered for the Toolkit. Check out the Futures Roadmap to see some of the features we have planned."

The first CTP of the WPF Toolkit includes the new WPF Datagrid.  Future releases will include a DatePicker/Calendar and more.  Jaime Rodriguez already has 3 posts on the Datagrid:

dabbling around the new WPF datagrid (part 1)

datagrid (part 2) — Show me some code

Datagrid (part3): styling

While I am at it, Jaime has a nice little "cheat-sheet to some of the WPF 3.5 SP1 features" at http://blogs.msdn.com/jaimer/archive/2008/08/15/cheat-sheet-to-some-of-the-wpf-3-5-sp1-features.aspx

Technorati Tags: ,

WEBCAST RECORDING: Adding Mapping Capabilities to your Applications with Virtual Earth and ASP.NET AJAX

First, let me apologize since I promised to make this recording available almost two months ago.  I was trying to get the recording uploaded to the same Live Meeting servers as my other webcasts.  Needless to say, I had some challenges.  I decided to upload it to Silverlight Streaming.  I had to split the presentation into two files since this is a 90 minute presentation and Silverlight Streaming has file size limits.

In this presentation, I show you the fundamentals of the Virtual Earth Map Control 6.1 using JavaScript.  Then, I show how you can use ASP.NET AJAX and the Windows Communication Foundation (WCF) to make building Virtual Earth solutions easier.  Finally, I show you how you can host Virtual Earth in a desktop application.

Part I:

[Double click the video to view full screen]

http://silverlight.services.live.com/invoke/21188/ve6.1webcast_part1/iframe.html

Click here to download Part I wmv

Part II:

[Double click the video to view full screen]

http://silverlight.services.live.com/invoke/21188/ve6.1webcast_part2/iframe.html

Click here to download Part II wmv

So what’s the benefit of this recording?  First, it is much higher quality than the Live Meeting recording since I used Camtasia Studio.  Second, the content is updated to use the Virtual Earth Map Control 6.1 and the Virtual Earth JavaScript Intellisense Helper.  Finally, since it’s hosted using Silverlight Streaming, you don’t have to register to view it. 

Here are some download links for the webcast:

Deck: http://cid-1f72da7294089597.skydrive.live.com/embedrow.aspx/Public/Virtual%20Earth/marcscVEProgramming.pptx

Code: http://cid-1f72da7294089597.skydrive.live.com/embedrow.aspx/Public/Virtual%20Earth/VEMapControlDemo|_v6.1|_VS2008.zip

The sample demonstrating hosting Virtual Earth in a Windows Presentation Foundation (WPF) is old.  I have an updated sample.  Details about the updated sample are available at http://blogs.msdn.com/devkeydet/archive/2008/06/24/wpf-and-virtual-earth-revisited.aspx.  You can also watch a screencast about the updated sample at https://channel9.msdn.com/posts/keydet/Using-Virtual-Earth-in-a-WPF-Application/

Technorati Tags: ,,,,

WPF and Virtual Earth revisited

I’ve been pretty quite on the blogging front lately.  Every once in a while, I get the opportunity to work on something a little meatier than writing demo code.  Almost all of my time over the last month or so has been spent working on a couple such opportunities.  During this time, I worked on a more creative/reusable approach to hosting Virtual Earth in a WPF application.  If you have looked at any of my previous samples showing how to host Virtual Earth in a WPF app, you’ll recall I was using the WinForms WebBrowser control to host an html page that in turn hosts Virtual Earth.  Additionally, I used the WebBrowser control’s ability to enable communication between managed code and JavaScript.  One of the frustrations with this approach is that when using WinForms interop, all WinForms controls take the highest z-order in your app which means you cannot render WPF elements on top of the map.  The other thing that has always bothered me about my sample is although it showed how to implement the general approach, it did not wrap all the functionality into a reusable WPF Virtual Earth control.  Good news!  I have an updated sample.

I created the beginnings of a WPF Virtual Earth control.  That’s right, one you can just reference, add to your XAML, and start programming against without having to know the dirty underbelly of how it is implemented.

image

image

You simply use your .NET language of choice to program against the control’s API like you would with any other WPF control.  No need for JavaScript.

The control is a WPF wrapper around the Virtual Earth Map Control 6.1.  In the interest of time, I mirrored the the Virtual Earth Map Control 6.1 API.  However, there are a few deviations.  The control really should, but doesn’t, follow .NET coding and naming conventions.  For the most part, it mirrors the JavaScript API.  The control is far from perfect and it is currently only a subset of the JavaScript API.  I implemented the subset of API I needed for the work I was doing.  Having said that, I think I have created a decent foundation that could be built upon to have a full WPF wrapper around the Virtual Earth Map Control 6.1.

I decided to use the new WPF WebBrowser control that is in the .NET Framework 3.5 SP1.  The WPF WebBrowser control is similar to the WinForms WebBrowser.  The WPF WebBrowser control has the same z-order as it’s WinForms counterpart, but it eliminates the need for WinForms interop. 

The WPF map control allows you to create WPF UserControls and have them appear on top of the map:

,image

In the picture above, the InfoBox, which is the term Virtual Earth uses for the UI that pops up when you hover over a pushpin, is a UserControl that uses WPF databinding to show Title and Description.  I am clearly not taking advantage of the power of WPF in this example, but you get the point:).  You achieve this through the following code:

image

You set the InfoBox property of the map to an instance of your UserControl.  The map control does all the heavy lifting of positioning/showing/hiding your UserControl.  The map control also allows you to add as many UserControls as you’d like through map.AddControl.  However, you are responsible for positioning the controls yourself.  In the picture below, I have replaced the default Virtual Earth Dashboard control with a UserControl containing WPF buttons:

image

If the WPF WebBrowser control still has the z-order issue, then how am I rendering WPF content on top of the map?  I am using what I have been calling "layered window trickery" for lack of a better term.  The map control loads a transparent window with a higher z-order than the window the control is in.  The map control places the transparent window itself "covering" the area of the map control.  Since the top window is transparent, interaction with the map below behaves as if there isn’t a window over the map control.  When a call is made to map.AddControl() or to set the map.InfoBox property, I actually add the UserControl to the top window.  As you can imagine there is a bit of repositioning logic for the top window & WPF UI over top of the map.  I plan on recording a Channel 9 Screencast walking through the code.  If you can’t wait, then you can just download the sample here and dig through it yourself.  The control uses new features in the .NET Framework 3.5 SP1.  Make sure you install Visual Studio 2008 SP1 Beta before trying to open it.  Details here.

digg_url = ‘http://blogs.msdn.com/devkeydet/archive/2008/06/24/wpf-and-virtual-earth-revisited.aspx’;
digg_skin = ‘compact’;http://digg.com/tools/diggthis.js

FOLLOW UP: RIA Dinner (Reston, VA)

Thanks to everyone who attended the RIA dinner on June 17th.  I promised to publish the deck and code James used as well as some follow up links.  Here they are:

Presentation – deck, code

Expression on microsoft.com – http://www.microsoft.com/expression/

Expression Community Site – http://expression.microsoft.com/en-us/default.aspx (lots of great resources on the "learn" tab)

Expression Design Forum – http://forums.expression.microsoft.com/en-US/design/threads/

Expression Blend Forum – http://forums.expression.microsoft.com/en-US/blend/threads/

Expression Blog – http://blogs.msdn.com/expression/

nibbles: snack tutorials for hungry designers – http://www.nibblestutorials.net/

Technorati Tags: ,,

FOLLOW UP: Public Sector Developer Conference (Nashville, TN)

Thanks to everyone who attended.  Sorry about the overflow into the hallways.  There was much less dropoff between registration and attendance than we normally see.  Some of the content isn’t published yet.  Once it is, we’ll make sure to update this post with the appropriate links.

Building Rich Internet Applications Using Microsoft Silverlight 2

Building WPF Applications in Visual Studio 2008 and Expression Blenddeck, code

Data Access with Language Integrated Query

Overview of the .NET Framework 3.5 SP1 & ASP.NET MVC – deck, code

We also mentioned some downloadable tools that folks were interested in using.  Here are the ones I remember:

Visual LINQ (to SQL) Query Builder

LINQPad

If I forgot one, please let me know by posting a comment and I will update the post.  Thanks!

Marc

WPF validation with Enterprise Library 4.0

If you have not heard the announcement elsewhere, Enterprise Library 4.0 from patterns & practices is now availableMartin Bennedik just updated his WPF integration for the Validation Application Block (VAB) to work with Enterprise Library 4.0.  He has also added some very convenient features.  This is a MUST HAVE if you are looking to use VAB for validation of your business objects/entities.  The ErrorProvider from Martin makes surfacing the errors in your WPF UI so easy!

Technorati Tags: ,

FOLLOW UP: Public Sector Developer Conference (Downers Grove, IL)

Thanks to everyone who attended!  Here are the links to the decks and code for the sessions.  I don’t have the content from the LINQ & VSTO sessions yet, but will update this post when I get them.  However, I did promise to have a post up this morning.

How Visual Studio Team System 2008 will benefit your organization?deck

Language Integrated Query (LINQ)

Overview of the .NET Framework 3.5 SP1 & ASP.NET MVCdeck, resources, code (links to a post explaining how to get the code I based me demos on)

Office Development with VSTO  and Office Open XML Format

If you are interested in other content, I have a list of recorded webcasts in My Recorded Webcasts list.  There is a session similar to Joel’s LINQ session that covers LINQ to SQL in a little more detail as well as other topics which might interest you.  You might want to check out My Screencasts as well.