DCSIMG
Silverlight - Pavel's Blog
Sign in | Join | Help

Pavel's Blog

Pavel is a software guy that is interested in almost everything
software related... way too much for too little time

Browse by Tags

A UniformGrid for Silverlight/Windows Phone
07 February 12 10:00 PM | pavely | with no comments
The UniformGrid panel in WPF has some useful features, especially as an items panel in an ItemsControl . I blogged about the usefulness of the UniformGrid here . But what about Silverlight? It has no UniformGrid , but we can create one as a custom panel. This would be usable in Silverlight for the desktop and for Windows Phone, and would be a simple enough example to show in one post. The layout process In WPF/Silverlight, layout is a two step process. The first step is Measure: the panel asks each...
WPF Tip: Displaying Images in different Pixel formats
30 January 12 12:25 AM | pavely | 1 comment(s)
If we want to show an image in WPF, we typically use an Image element and connect its Source property to some image resource within our project: < Image Source ="Penguins.jpg" /> The Source property is not a string, it’s an ImageSource – an abstract type with several concrete implementations that provide a “real” image source. The above markup works thanks to the help of a type converter, that makes the source a BitmapImage – one of the simplest sources, that presents the image as...
First Meeting of the Windows Devices Israel User Group
17 January 12 10:21 AM | pavely | 3 comment(s)
Yesterday evening we’ve held the first meeting of the new Windows Devices user group at Microsoft offices in Ra’anana. This first meeting was dedicated to Windows Phone 7. Elad and I had a lot of fun and we hope you guys had fun as well and learned something along the way. What we’ve done is talk about the Windows Phone platform in general, its capabilities, the tools used to write applications and games, while showing a few demos. We tried to answer as many general questions as we could, and those...
My Sessions at the MobiWeb Conference
16 December 11 12:21 PM | pavely | with no comments
The MobiWeb Conference is scheduled for the 15-17 of January in the Daniel Hotel in Hertzliya (Israel). The sessions in the conference are “one day seminars”, each seminar covering some topic related to web development, mobile development, or both. I’ll be presenting two seminars at the conference. The fist, “Building Windows Phone 7 Apps with Silverlight” (on the 16th) will cover the development for the (relatively new) Windows Phone platform using Silverlight (and maybe some XNA if we have time...
The Future of Silverlight
14 November 11 06:33 PM | pavely | with no comments
There’s been a lot of talk lately about Silverlight. Will Silverlight 5 (to be released this month) be the last major version of Silverlight? I don’t know, but here are my thoughts on the subject. Silverlight will stay in the context of Windows Phone, that’s seems pretty sure, but what about the web at large? Is Silverlight (and its rival, Adobe Flash) doomed? In recent years, there has been gravitation towards standards – that is, world wide standards, not Microsoft’s or anyone else’s for that matter...
Windows Phone: Combining Silverlight & XNA in a Single Page
26 October 11 09:30 PM | pavely | with no comments
There are two very distinct ways to program on Windows Phone 7.x: Silverlight & XNA. Silverlight is about UI, retained graphics and is event driven. XNA is about immediate mode graphics, based on a timer and polling; Very different models indeed. Each has its strengths and weaknesses. One of the new features in WP7.1 (“mango”) is the ability to combine the two to get the best of both worlds. Here’s a typical scenario where this need may come up: suppose you’re developing an XNA game (2D or 3D...
Getting Started with Windows Phone Development
22 July 11 04:56 PM | pavely | with no comments
I must admit I was reluctant to get into Windows Phone development too deeply because I had no actual device running the Windows Phone OS. An emulator, no matter how good, cannot replace the actual device experience, and for some applications such as games, is simply inadequate. Well, the excuses are over. I got a Windows Phone device (the Samsung Omnia 7 ) a few days ago. It’s time to take WP7 development more seriously (but not too seriously, as it’s fun…). Instead of going with the traditional...
WPF/Silverlight Data Binding Tip: FallbackValue
25 June 11 03:44 PM | pavely | with no comments
Consider the following piece of XAML (part of an Image Viewer application), that wants to set the Window title (in WPF) based on the currently loaded image file: Title ="{ Binding ImagePath , StringFormat =Image Viewer ({ 0} )}" This assumes that a DataContext exists, and exposes a property named ImagePath . This works well if such an object actually exists. But what happens when the application starts up and there is no image loaded yet, meaning the DataContext remains null? The Title...
תגים:, , , ,
Some Short Videos I Made
26 May 11 02:30 PM | pavely | with no comments
I’ve created a few short videos, covering some introductory material – still may be useful for some… The audio quality is not the best possible, but should be fairly understandable. All the videos are in Hebrew (sorry, non-Hebrew speakers! You can still watch me type code samples, it may have some value) The videos are: Introduction to C# 5.0 asynchronous programming Introduction to the Managed Extensibility Framework (MEF) Understanding XAML (Part 1) Understanding XAML (Part 2)   They are also...
Silverlight Quirk: Content Alignment not respected for ListBox
23 August 10 08:38 PM | pavely | 2 comment(s)
Silverlight and WPF have many similarities, and many differences as well. One of the subtle ones I’ve discovered is with respecting the HorizontalContentAlignment property in a ListBox. Here’s the same application, written in WPF and Silverlight with the following ListBox (bound to a collection of Book objects) and its item template:    < ListBox HorizontalContentAlignment = "Stretch" x : Name = "_list" >         < ListBox...
תגים:, , , , ,
My WebTech Session
13 August 10 10:55 AM | pavely | with no comments
On Wednesday I delivered a session titled “Introduction to Silverlight Development” at the WebTech conference. Thank you all for attending! Here is the slide deck and the demos. Demos Introduction to Silverlight
Frame Based Animations in Silverlight
11 August 10 12:30 PM | pavely | 1 comment(s)
One way to do animations in Silverlight is to make gradual changes to dependency properties. Although this is powerful and convenient, it lacks in control. For example, developing a game with Silverlight may require complex movements of “bad guys” and other background elements that are not well suited for the property-based animation. The alternative is frame-based animation. That is, every frame some change is applied to an element (such as the attached Canvas.Left and Canvas.Top properties, effectively...
Me at WebTech
08 August 10 09:36 AM | pavely | with no comments
The first WebTech conference is this Wednesday (the 11th of August), targeting web developers and other web authors. Technologies presented varies and are not limited to the Microsoft world. Java, PHP, Silverlight, ASP.NET, MVC, HTML, CSS and more. I will be presenting an “Introduction to Silverlight Development” session. So, if you’re a web developer/designer and have not yet been exposed to Silverlight, this is your chance to see what Silverlight is and what can you do with it. Maybe I’ll see you...
Installing the Silverlight 2 Beta 1 Tools for VS 2008
06 March 08 09:43 AM | pavely | with no comments
I've discovered a small hitch while trying to install the newly released components: If you want the VS tools, install silverlight_chainer.exe, but do NOT install the Silverlight SDK. If you do install it before the tools, the VS tools will complain that one of 5 things is wrong, but it isn't really. Just don't install the SDK - it will be installed as part of the VS 2008 tools for Silverlight 2 Beta 1. To those installing the MVC framework preview 2, be sure to read the Release Notes...