31. January 2011 14:39
Silverlight's auto-complete box is a very versatile control and also often subject of questions in the Silverlight forums. In a recent project I have taken a deeper look at it and decided to write an article about its features. First I explain the very basics and simple usage scenarios. After that I move on to more advanced topics like using custom filters and item templates, and eventually to asynchronous filtering using a web service. I also show a possible way to integrate that into an MVVM application design. As always the complete source code is available for download too. The full article can be found here.
27. January 2011 08:35
Yesterday my new article on Silverlight Show has been published. In the series about XNA for Silverlight developers on Windows Phone 7, this part is about text rendering. If you come from a Silverlight background you will realize that text output in XNA is really generally different. It is based on bitmaps instead of vectors like in Silverlight, has limitations in design and effects, and there are no built-in controls that aid you with layout or similar problems. As always I discuss the differences to Silverlight, show you the basics you need to know for text rendering in XNA and move on to more advanced topics in the course of the article. Read the full version here.
21. January 2011 18:13
Some time ago Microsoft released the four Silverlight Application Themes Jet Pack, Accent Color, Windows 7 and Cosmopolitan. You can find that download here. The Themes are provided as comfortable installers and integrate as new templates into Visual Studio. The drawback of the loose style XAML files the themes come as is that they cannot be easily used as Toolkit compatible theme packs, which makes dynamic switching of themes difficult, for example. It also requires more effort than necessary to apply the styles in an already existing project. I decided to convert the themes into theme packs, but that turned out to be harder than expected. Read on for a step-by-step guide and an online demo with full source. More...
18. January 2011 11:49
After my introductory "Part 0" this is the second part of the XNA learning series for Silverlight developers on Windows Phone 7. It is composed of three parts:
In the first part I shed some light on the biggest differences between the programming model of XNA and Silverlight. What may seem odd to Silverlight developers first has valid reasons, which I'm trying to explain here. The second part creates an empty XNA project using the default game template and then analyzes the structure of the solution in Visual Studio. I introduce the concept of content and the content pipeline and how you use it in your game project. The last part adds some content to the project to finish a "Hallo World"-like first project.
As always, you can read the full article over at Silverlight Show. It's a lengthy read this time, but I hope you'll enjoy it nevertheless. That was needed to create the foundation we can use to built upon in the next parts. I promise the next articles will be a lighter read :-).
13. January 2011 13:56
In my first article on Silverlight Show about XNA for Silverlight developers, I briefly mentioned the Gesture Listener of the Silverlight Toolkit that enables advanced gestures in Silverlight on the Windows Phone by using the XNA input libraries. Since then I've been asked about the pinch gesture in particular, so I'm providing a short example of how to use it. More...
10. January 2011 18:36
Some time ago I've been invited by Silverlight Show to write articles on Silverlight and Windows Phone 7 topics. For those of you who don't know this site let me say that you've missed something! It's a community portal created by CompletIT that focuses on Silverlight development and offers a great amount of high-quality content. I often point people to articles on Silverlight Show to answer questions or give examples in the Silverlight forums.
On the new Windows Phone 7 platform, the borders between two worlds have been blurred: XNA and Silverlight not only coexist next to each other, but often can be and are already used in conjunction. That way normal Silverlight developers come in contact with XNA, and realize that although mostly for game programming, XNA has several uses in non-gaming applications too. We figured that with this new mobile platform, and the possibility to create fancy games for it, more and more Silverlight developers might become interested in learning more about XNA. To this end, the "XNA for Silverlight developers" articles will provide an introduction to several XNA topics, with focus on developers that come from a Silverlight background and explanations on the differences in programming style and application modeling between the two worlds.
Part 0 actually is an introductory article that briefly explains the architecture on the Windows Phone 7 platform, XNA and Silverlight interop, and shows some factors you as a developer should take into account when you want to create games for these devices. The article can be found here:
XNA for Silverlight developers: Part 0 – Why should I care?
I hope you enjoy this series. Feel free to leave any comments and suggestions there, your feedback is appreciated.
8. January 2011 18:11
A question that frequently surfaces on the Silverlight forums is the one after a DateTimePicker control. The Silverlight Toolkit has both a date picker and a time picker, but not the combination of both. The issue tracker of the Toolkit project on Codeplex lists that control among the Top-20 voted features. But when you ask about it, the answer usually is that it's so simple to build one yourself that it's not worth creating a dedicated control for that. However, when I looked at the source code of an attempted DateTimePicker control someone sent me in desperation, I realized that you can get lost in undesired behavior and unforeseeable problems with mutually triggering events easily. So here is a short post that shows a straight-forward way to create a functioning simple DateTimePicker control. You can download the complete sample at the end of this article. More...
4. January 2011 16:10
Note: although this post is primarily about the BookShelf code sample, it also contains general information about shader effects in Silverlight and their performance implications, as well as some weird behaviors of the Silverlight runtime regarding those effects.
On 2010's PDC John Papa held a session named "Kung Fu Silverlight" to show some concepts of MVVM and RIA Services. The associated source code can be downloaded here. I've often used this code as a reference for people who were looking for a nice MVVM sample. Even if it's not fully polished to the last detail, it's an excellent start to learn about the involved patterns and practices. Yesterday, when I wanted to use the sample to demonstrate something, it required me to log in. And when I did that, my browser basically crashed. Well, actually it only hung, but it didn't come back to life, so I had to kill the process. I knew the sample had some performance issues due to a certain visual effect that results in problems, but it never happened before that my browser simply stopped working, so I decided to finally explore the problem in more detail and fix it. Read on to learn how. More...
2. January 2011 09:35
This morning I had to type a lot of grid definitions manually (would've been so much easier with Blend...), and I remembered a post by Colin Eberhardt I had read some time ago, about a simplified grid markup for Silverlight (and WPF). The idea behind it is nice, and when I had to type something like this:
... for the fifth time, I took a little break and extended Colin's approach to include the above declarations. More...