WPF book has been released and Silverlight book will be available on 28th of August

July 12th, 2010

Exactly two years after the first release of the WPF-book the second edition is available since some days. Find more details about the content and where you can order it on http://www.thomasclaudiushuber.com/wpf.

The Silverlight-Book has also been written and is currently running through the process of reading, testing and printing. It will be in stores on 28th of August. Find more information about the Silverlight-Book and where you can order it on http://www.thomasclaudiushuber.com/silverlight.

I hope you like the books and you can master the “programming-challenge” of your wpf- and silverlight-projects with the knowhow you got from the books.

Cheers,
Thomas

Friday-Evening Fun with Silverlight’s Animation Easing Functions

April 30th, 2010

This weekend I’ve to finish the second edition of my WPF-book. Luckily it’s going to rain tomorrow. But I’ve almost done it. This evening I’ve just ported a small sample for Animation Easing Functions from WPF to Silverlight. It was easy, all I had to do was using a PathGeometry instead of the not existing StreamGeometry to draw the lines of the functions. Use the fun-sample below to play around with these easing functions. You’ll get the code of this version with my upcoming german Silverlight-Book in August. So have fun, Cheers Thomas.

Visual Studio has been released, Silverlight 4 has been released and the books are on their way…

April 17th, 2010

After Visual Studio has been released on Monday this week, Silverlight 4 is also available since Thursday. I’ll have to speed up my book-writing. As many of you know, I’m writing on a second edition of my WPF-book to .NET 4.0 and Visual Studio 2010. I’m also writing on a Silverlight-book (about Silverlight 4.0). Below some details of the two books.

The WPF-Book:

I’ll finish the update of my WPF-book till end of April, so it’ll be released in June. There are many new things in it, like a section to the Model-View-ViewModel-Pattern, Multitouch, the new Controls DatePicker, Calendar and DataGrid, Animation Easing-Functions, VisualStateManager, Windows 7 Taskbarintegration, Pixel-Shaders and much more. Of course there’s also a new version of the FriendStorage-Application that is using new features and controls, like e.g. the DataGrid:

01_06

FriendStorage now also has integration into the Windows 7 Taskbar. So you can iterate through the friends via the Buttons shown in the Windows 7 Taskbar Thumbnail. Also recognize that the image of the current friend is also displayed as overlay-image on the Taskbar-Button

image 

You find the second edition of my WPF-book here on amazon.de

The Silverlight-book

I’ll write on the Silverlight-book till end of June, so it’ll be released in August. I hope you’re looking forward to it. I gave and will give my best that it’s a great resource to all professional Silverlight-Developers and those who want to become one of those. In May I’ll show the contents of the Silverlight-book on my homepage. I’ll also blog here. For now I can say that there’s a FriendStorageOnline-Application in the Samples with Login/Registration and CRUD-Operations via WCF Ria Services. A logged-in User can create Friendlists and insert data as usual. The app looks like this:

01_04

The Silverlight-book is also already on amazon here. But keep in mind that there could be a change in pages (some more up to 1000) and so maybe also in price. I’ll post more information about the targeted pagecount in May, then you’ll also see some details of the contents.

Ciao,
Thomas

Silverlight 4 Release Candidate is here

March 15th, 2010

The Mix has started some hours ago, and here it is, the Silverlight 4 Release Candidate. Now you can move your development-environment from Visual Studio 2010 Beta to RC. There are also updates to WCF RIA Services, a WCF RIA Services Toolkit etc. Find everything you need here:

http://www.silverlight.net/getstarted/silverlight-4/

There’s also a fantastic post from Tim Heuer about the changes in the Silverlight RC here:

http://timheuer.com/blog/archive/2010/03/15/whats-new-in-silverlight-4-rc-mix10.aspx

Another great thing is that Silverlight 4 is THE technology for Windows Phone 7. So I think I’ve to sell my iPhone and buy me a new Mobile with Windows Phone 7 on it. If you want to start developing Mobile-apps with Silverlight, also go to Tim Heuers blog: http://timheuer.com/blog/archive/2010/03/15/get-started-with-silverlight-for-windows-phone.aspx

So have fun with the new release. I’ll go downstairs in my dark room now and finish up my Silverlight 4.0 book. It’ll take a while. For now I can say if you like my WPF-book, you’ll love that Silverlight book for sure. :)

BASTA! Spring 2010 ::: WPF 4.0 – Die Neuerungen im Überblick

February 25th, 2010

Danke für die zahlreiche Teilnahme an meiner Session zu den Neuerungen in WPF 4.0. Ich hoffe, es hat allen Spass gemacht und jeder konnte etwas mitnehmen. Folgend die versprochenen Slides und Demos:

Slides
Demos

Happy Coding,
Thomas

BASTA! Spring 2010 – Model-View-ViewModel

February 24th, 2010

Hallo liebe Freunde der BASTA!, VB.NET'ler und Teilnehmer an meiner Session zum Model-View-ViewModel-Pattern. Folgend die versprochenen Slides und die Beispielanwendung zum Download.

Slides
MVVM.BeispielApp

Viel Spass damit,
Thomas

From Visual Studio 2010 Release Candidate back to Beta 2

February 22nd, 2010

If you’ve played around with Visual Studio 2010 Release Candidate (RC), you sure have noticed that it’s pretty fast. E.g. the WPF- and Silverlight-Designers come up quickly and much faster that in Visual Studio 2008.

But for now there are some reasons to wait before installing Visual Studio 2010 RC:

  • Silverlight 4 Beta is not supported. Silverlight 4 will be supported with the next public drop of Silverlight 4, what means when the Silverlight 4 RC is available. A date for that hasn’t been specified yet by Microsoft.
  • The available Preview Version for .NET 4.0 of Expression Blend doesn’t work with Visual Studio 2010 RC. It only works with Beta 2 of Visual Studio 2010. A new version will be available soon as the Expression Website says, but no one knows what "soon" means.

The second point I just noticed now. And so I decided to go back to Beta 2 cause I’ve a session about Model-View-ViewModel this week at BASTA! Spring in Darmstadt.

To go back to Beta 2, make sure you uninstall everything of the Release Candidate. After I’ve uninstalled Visual Studio 2010 RC, I had additionally to remove .NET Framework 4.0 from Programs in Control Panel. Tip: Order the installed programs by date, then you see what you’ve to uninstall pretty good.

After I’ve installed the Beta 2 again, everything worked fine. But I got an error when compiling my WPF-project telling me the following:

"GenerateResource" task failed unexpectedly. System.DllNotFoundException: Unable to load DLL ‘FileTracker.dll’ …”

After some search I found a connect-entry on microsoft.com with the solution. My folder "C:\Windows\Microsoft.NET\Framework” contained a “v4.0” directory additionally to the "v4.0.21006" directory installed with Visual Studio 2010 Beta 2. After deleting the additional folder that has a higher number than v4.0.21006 (it’s the RC ;-)), the Beta 2 works fine again and I can compile everything as expected. Find the connect-entry that pointed me to the solution here:  https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=501894&wa=wsignin1.0

Be careful with Default-Values of Dependency-Properties if you’re using Reference-Types.

February 11th, 2010

I’ve justed finished a small PieMenu for a WPF-Application for one of our customers in switzerland. The PieMenu is displayed below with a black-red-style. The Style, colors and items can be changed individually. The colors and icons etc. in the PieMenu below are just the ones I’ve created for testing purposes.

image

While developing this PieMenu I’ve implemented several Dependency-Properties. Some of them containing ObservableCollections as Default-Values like this:

static PieMenu()
{
 LeftSubItemsProperty = DependencyProperty.Register(
  "LeftSubItems", typeof (ObservableCollection<PieMenuItem>),
  typeof (PieMenu), new UIPropertyMetadata(
  new ObservableCollection<PieMenuItem>()));
  …
}

I developed, made some UI-Tests, developed, made some UI-Tests and so on and everything was fine. But only till I’ve placed a second PieMenu in my Test-App. All Items of PieMenu1 and PieMenu2 were contained in PieMenu1 and PieMenu2. If you see the line above you can image what happened, if you sit in front of your code with at least 1000 lines of code in the PieMenu-class, you have to search a bit.

In the line above the ObservableCollection created as a Default-Value for the Dependency-Property is of course a static one, because the Dependency-Property is stored in a static variable and as you see in the code-snippet above it is initialized in the static constructor of the PieMenu-class. There’s no instance around at this point.

In other words that means every PieMenu that won’t explicitly specify an ObservableCollection gets the Default-Value, and that’s a static one that will be shared over all PieMenus in your app. So all the Items of every PieMenu are in every PieMenu. Isn’t that amazing? :-)

The solution I’ve used is straight forward. Just create the Dependency-Property with a null-reference as its default-value:

static PieMenu()
{
 LeftItemProperty = DependencyProperty.Register(
  "LeftItem", typeof (PieMenuItem), typeof (PieMenu),
  new UIPropertyMetadata(null));
}

In the Instance-Constructor assign a new ObservableCollection to the Dependency-Property and you’re fine.

public PieMenu()
{
 LeftSubItems = new ObservableCollection<PieMenuItem>();
 …
}

Keep in mind that setting a local value in the Constructor won’t let you set this value in a Style anymore. But for the PieMenu and the ObservableCollection that won’t matter. You’re just adding and removing elements, you don’t want to define this Collection in a Style.

So, as you see in this post, you’ve to implement Dependency-Properties with Default-Values that are reference-types with caution.

Happy coding! ;-)

Visual Studio 2010 RC and Silverlight 4 Beta

February 9th, 2010

Yesterday Visual Studio 2010 RC was released to MSDN Subscribers (find the link here), tomorrow it’s available for download for everyone. The performance is great as far as I can say by using it for at least one day. But it lacks on support for Silverlight 4 Beta.

If you’re developing Silverlight 4 applications, it is recommended that you stay on Visual Studio 2010 Beta 2 until new bits of Silverlight come out. “New bits of Silverlight” means a Silverlight Release Candidate. It is expected also for this month. Wow, how the time is ticking away. I just thought it has been some days ago since I read Dr. Tim Sneaths post about the Silverlight 1.0 RC, and now we’ll have the 4.0 Release Candidate soon.

The more I work with Silverlight 4.0, the more I love this Plugin. While I missed some things like e.g. implicit Styles and basedOn Styles in version 2.0, version 4.0 now contains both of them. Also printing is supported, WebCam- and Microphone-Access, Com-Interop for Out-Of-Browser apps etc. And the most important aspects for Business-Apps, Data-Access, Validation etc. are easy to do. With WCF RIA Services (formerly .NET RIA Services) you’ve a great framework for building Business apps. Also I’ve to say that I’m a total fan of the REST-based WCF Data Services (formerly ADO.NET Data Services), which are now also included in Sharepoint 2010. Silverlight contains a small Client API for accessing those services and make the classical CRUD-operations.

Silverlight 4.0 contains many great features to build really powerful apps. But not yet with Visual Studio 2010 RC. As soon as the new Silverlight-bits will be available, you’ll read it here.

Visual Studio 2010 Release Candidate (RC) available next week

February 6th, 2010

The launch date for Visual Studio 2010 RTM is the 12th of April. This month there’ll be a Release Candidate (RC) and Scott Guthrie mentioned on his blog in a post about ASP.NET MVC 2 RC that it will be available soon. Now everybody speculates about the date and what “soon” means. Days or weeks?

The Blog about the Visual Studio quality tools contains the answer. Visual Studio 2010 RC will be released in the week of 8th February. Find the post with that information here:

http://blogs.msdn.com/vstsqualitytools/archive/2010/02/05/what-s-new-for-testing-tools-in-the-rc.aspx