DCSIMG
DEV - 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...
Next Windows Devices User Group Meeting
05 February 12 10:19 PM | pavely | with no comments
The second meeting of the Windows Devices User Group will be held on February 28th, at 17:00, Microsoft Offices in Ra’anana. The registration link and detailed agenda is here: http://windowsphonenavandlifecycle.eventbrite.com/ In this meeting we’ll talk about page navigation and the application lifecycle, which got a bit more complicated (but performs better) in the “Mango” release. We’ll also hear a “real life story” of porting an application to Windows Phone. See you there!
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...
From Enumerable to Observable
18 January 12 12:56 PM | pavely | with no comments
The IEnumerable<T> interface represents a collection of objects of type T, and is used heavily thanks to the C# foreach construct. Better yet, in the LINQ world, this is the interface that is “extended” via extension methods by the System.Linq.Enumerable class. This makes IEnumerable<T> both easy to use as well as powerful. But is it the best interface for getting data out of a possible collection? Recap: what is IEnumerable<T> ? IEnumerable<T> has only one method: GetEnumerator...
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...
Using the Async CTP With Windows Phone
07 January 12 12:05 PM | pavely | with no comments
The Async CTP that exposes C# 5.0 features to be used with asynchronous programming is not just for the full .NET Framework. There are versions for Silverlight (4 and 5) and even Windows Phone (which can be viewed as Silverlight 4, but has a separate supporting assembly). To demonstrate, I’ve adapted my sample of the Mandelbrot set to Windows Phone, while taking advantage of the async features to keep the UI responsive. After creating the initial Silverlight for Windows Phone project, I’ve added...
The laptop’s new life with SSD
05 January 12 06:37 PM | pavely | with no comments
A few days ago I upgraded my hard drives in my laptop to SSD (Solid State Drive). This is one of those things that once you do it – there’s no turning back; you’ll never consider using a “regular” spinning hard disk. Hard disk speed is crucial to a developer – Visual Studio 2010 is a hungry I/O beast, and when various extensions are installed, things get worse. My laptop is no woos - it’s an Alienware m17x -R2, equipped with a Core-i7 processor, 8GB of RAM and an ATI Radeon 5870 card (DirectX 11...
תגים:,
Calculating PI in .NET
30 December 11 10:31 PM | pavely | 2 comment(s)
I always loved mathematics. Although I’m certainly not a mathematician by profession, I’m always intrigued and inspired by math’s pureness and cleverness. One of the simplest and fascinating aspects of math is the number PI . Described simply as the ratio of a circle’s circumference to its diameter, it’s a constant with infinite digits after the decimal point and most importantly, non repeating (at least as far as I know). There are many ways to calculate PI, as evident within the PI Wikipedia link...
Getting Device Information in Windows Phone 7
19 December 11 06:30 PM | pavely | with no comments
Windows Phone 7 mandates a set of minimum requirements from devices it runs on, such as camera resolution, hardware graphics support, the existence of sensors such as microphone, GPS, touch, etc. However, sometimes it’s useful to know the exact specifications of a particular device the application is running on, so the application can optimize. As a simple example, running on the emulator or a real device can make a huge difference – maybe the application has a way of doing things differently when...
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...
Announcing the Israeli Windows Phone User Group
08 December 11 07:44 PM | pavely | with no comments
Although Windows Phone is not yet officially launched in Israel, it’s time for Israeli developers to start developing for the Windows Phone platform, even if most don’t have an actual device at hand. A new user group dedicated to development for Windows Phone has been created, managed by Tomer Shamam and yours truly. The first meeting will be held on December 27th at the Microsoft Offices in Ra’anana. Please use this link to register and view the agenda: http://introwindowsphone.eventbrite.com In...
WPF Tip: Binding to the Selected Item in a Master-Details View
06 December 11 04:00 PM | pavely | with no comments
Master-details is a common way to display data. A master view provides minimal data for a collection of objects (e.g. book names), and when selecting one such item, a details view provides more information for the selected item (e.g. a book’s name, author, publication date, etc.). In WPF, data binding (in XAML) is typically used to achieve the connection between an object and its details without using any code. Let’s see how we can achieve this. Let’s say we want to show a list of book names, and...
תגים:, , , ,
Parallel Programming Open House Session
01 December 11 05:34 PM | pavely | with no comments
Today I presented a half-day session on Multithreading & Parallel Programming at John Bryce center in Tel Aviv. Thank you all for attending! I certainly enjoyed presenting these fascinating topics. I’ve attached the demos I showed. The presentation will be sent to those who attended by email. Thank you! ParallelDemos
WPF Tip: SharedSizeGroup
26 November 11 05:54 PM | pavely | with no comments
Suppose we want to display a set of objects in a ListBox (or other ItemsControl ) using a DataTemplate that uses a Grid : < ListBox HorizontalContentAlignment ="Stretch" x : Name ="_list" > < ListBox.ItemTemplate > < DataTemplate > < Border Margin ="2" BorderBrush ="Blue" BorderThickness ="2" Padding ="2"> < Grid > < Grid.ColumnDefinitions > < ColumnDefinition Width ="Auto" /> < ColumnDefinition...
תגים:, , , ,
My C# 5.0 Async Session at Microsoft
22 November 11 03:36 PM | pavely | with no comments
Today I presented a session on C# 5.0 asynchronous programming. Thank you all for coming, it was a pleasure to present this interesting stuff. The presentation and demos are attached to this post. The NetFlix and RSS aggregator demos are part of the Async CTP installation. Any questions or comments are very welcome! OpenHouseAsyncProgC#5.NET4.5.zip OpenHouseAsyncProgC#5.NET4.5.zip
More Posts Next page »