DCSIMG
Arik Poznanski's Blog

Arik Poznanski's Blog

It CAN be done with .NET

News

MVP

MCC

CodeProject MVP

MCPD

MCTS

Subscribe to my blog by email

Arik Poznanski LinkedIn Profile

Email: arik.com at gmail dot com
or, use this form

Locations of visitors to this page


Sela Group

Sela Canada

DZone MVB

Links

Official Blogs

WPF / SL Blogs

Developers Blogs

Blog Summary

I feel this is a good time for me to present a summary of some of the posts I wrote..

Most Interesting Posts

Following are posts that I'm personally proud of.

Shake Gestures Library – A Windows Phone Recipe
In this post I present an algorithm for detecting shake gestures on a Windows Phone system using the accelerometer sensor. This is by far my favorite post since I actually needed to use some math to solve this one.

image

 

How To Use a .NET 4 Based DLL From .NET 2 Based Application?
In this post I explain how can one use COM Interop facilities to load two CLR versions (both 2.0 and 4.0) into the same process, thus enabling code that runs under .NET 2.0 to call code that runs under .NET 4.0

image

 

Using Windows Phone As Windows 7 Accelerometer Sensor
In this post I present a cool project I've done: a user-mode driver that enables you to use your Windows Phone device as a standard Windows 7 accelerometer sensor.

image

 

Most Popular Posts

Following are posts that are very popular on my blog. Some of them, only god knows why…

 

Tutorials

Following are some posts that I use as indexes to tutorials I wrote.

 

Open Source Projects

Following are open source projects I created.

 

Awards

During the past year I've been awarded several titles:

 

Conferences

Some posts about conferences that I attended.

 

Topics

And finally, here are the main topics I wrote about.

 

That's it for now,
Arik Poznanski.

Posted: Nov 20 2011, 12:13 AM by arik |
תגים:, , ,

I’m a Microsoft MVP!

  MVP Logo

I've recently received an email from Microsoft notifying me I've been awarded Microsoft MVP in Visual C# !

I’d like to thank Microsoft and specifically Guy Burstein for his guidance and excellent advice on finding ways to help the developers community.
Also, a special thanks is in order for my managers at Sela Group: David Bassa, Caro Segal and Ishai Ram for giving me the time to invest in the developers community.
Lastly, I'd like to thank you, my blog readers.

Now that I got this out, I can continue my Thailand honeymoon trip :)


Thailand 2011

That's it for now,
Arik Poznanski.

Posted: Oct 02 2011, 06:25 PM by arik | with 9 comment(s) |
תגים:, , , ,

Comparing Versions of a .NET Framework DLL Using NDepend

Following Build conference, many people may ask what is new in the .NET Framework.
Well, you could find out by examining the documentation, but then you are limited to what it covers. If you want to know ALL that is new / updated in the .NET Framework, read on..

You can use the following method to easily find the difference between .NET Framework 4.5 and its previous version, .NET Framework 4.0!

In this post I will show you how you can use the tool NDepend to compare two versions of a DLL which is part of the .NET Framework.

I've already done it major parts of the framework and found interesting results! Unfortunately, I don't have the time to publish my results since I'm going out on vacation for a month. So I leave you with these instructions on how to dig easily in the right places.

 

Introduction

NDepend is a tool for static analysis of .NET code. It has many features including the ability to run both predefined and custom queries against the code base.
These queries let you evaluate the quality of the code.

Another neat feature of NDepend is the ability to compare two versions of the same DLL. This lets you see progress between different builds of your project. Note that you don't need the actual code, you compare the actual DLLs.

Using NDepend to compare DLLs that are part of the .NET Framework is not trivial, but can be done. This post will show you exactly how.

 

Prerequisites

image

You should have NDepend on your computer, download it here.

We will compare two different versions of the file mscorlib.dll

Some assumption before we continue:

  1. The .NET Framework v4.0 version of the file resides in: C:\NET\v4.0\mscorlib.dll
  2. The .NET Framework v4.5 version of the file resides in: C:\NET\v4.5\mscorlib.dll

 

Step 1: Create an NDepend project for each version of the .NET Framework

In this section we will analyze each version of the DLL in a different project, so the following steps will be done twice. On the next step we will compare the two project results.

 

Launch NDepend and select Create Project…

image

 

Fill the fields Project Name and Location and press OK.

image

 

Select Browse… and choose the first file: C:\Net\v4.0\mscorlib.dll

image

 

Now select View Folders that contain .NET assemblies to analyze

image

 

Select the .NET Framework folders that were automatically added and remove each one of them by right-clicking and selecting Remove

image

 

Finally, click the green Play button or simply press F5 to start analyzing the DLL

image

 

When the analyze is finished you should see some statistics about the selected DLL and you will have options to manually analyzing the file. For our purpose we can simply skip this and close the application (entirely).

image

 

Now repeat these instructions to analyze the second version of your DLL. Don't forget to remove the .NET Framework folders!

 

Step 2: Compare between the NDepend projects

In this step we will compare the two project results from the previous step.

Launch NDepend and select Compare: 2 versions of a code base

image

 

Select the projects you have created in the previous step. Make sure you put the older version on the left and the newer version on the right.

image

 

That's it! now you can easily compare the two versions. For example, you can check which types are new in the new DLL version, or which types have changed, etc..

image

 

That's it for now,
Arik Poznanski.

kick it on DotNetKicks.com Shout it

Windows 8: What's New?

Got back from Build conference. Since I expect many people will ask me "So, what's new?" and since the answer is rather complex, I figured I should try to write a post about it, so here goes…

build_logo

 

General Information

  • Windows 7 sold (i.e. legal copies) over 450,000,000 copies since it was released.
  • Windows 7 bypassed Windows XP in world usage.
  • Windows 8 will be used primary for tablets and other touch-based devices.
  • Windows 8 can run on Intel-based processors or ARM-based processors.
  • Windows 8 consumes fewer resources than Windows 7 and has the same hardware requirements.
  • Windows 8 has a new user interface, used primarily with touch screens but supports fallback to mouse and keyboard, applications that uses the new user interface are called "Metro-style applications".
  • All participants of the Build conference received a Samsung tablet with a preview release of Windows 8, that has the following spec:
    • Intel Core i5
    • 4GB DDR3
    • 64GB SSD
    • 11.6" diagonal, 1366x768 display
    • Included dock and USB keyboard
  • Windows 8 Developer Preview version can be downloaded here.

 

Windows 8 for Developers

  • There is a new way to expose Windows API named Windows Runtime or WinRT.
    • WinRT is completely native and is built above COM with the addition of inheritance, generics, delegates and more. Basically WinRT = Modern COM.
    • WinRT doesn't cover all previous Win32 APIs.
    • WinRT has can be used from C++, C#, VB.NET and JavaScript using language projections which are auto-generated from the WinRT APIs and provide a natural and familiar experience for developers of the language.
    • WinRT API follow a guideline that says that every API which might take more than 50ms should be async. As a result a lot of WinRT APIs are async.

 

windows-8-platform-tools

  • WinRT includes a native UI framework, XAML-based, for building Metro-style applications.
  • The XAML of the new WinRT UI framework resembles Silverlight XAML rather than WPF XAML.
  • Metro-style applications can be built in the following technologies:
    • C++ and XAML
    • C# and XAML
    • VB.NET and XAML
    • JavaScript and HTML/CSS
  • A Metro-style application can collaborate with another Metro-style application without knowing him at all using several contracts that Windows 8 defines, e.g. share source contract and share target contract.
  • Metro-style applications should define the capabilities they use, similar to Windows Phone applications. At runtime these declarations are enforced.
  • C++ has new extensions that allows easy integration with WinRT, these extensions follow a syntax similar to C++/CLI, only they are completely native.
  • The next version of .NET Framework is 4.5, nothing too exciting there.

 

IDE Improvements

  • There is a preview version Visual Studio 11 and Expression Blend 5.
  • New in Visual Studio 11:
    • Added new project templates for developing Metro-style applications in all the supported languages.
    • Productivity Power Tools incorporated into Visual Studio 11.
    • New features for agile development including: Sprint Planning, Managing Task Board, Performing Code Reviews.
    • XAML properties editor is the same as the corresponding Blend editor.
    • Deploy to the new Windows App Store directly from Visual Studio 11.
    • Added tools for viewing and basic editing 3D models, images, textures and also for debugging DirectX based output.
    • Added feature that allows searching for code duplication based on semantic tree instead of simple text search.
  • New in Expression Blend 5:
    • Designing Metro-style HTML / CSS applications.
  • TFS will be available as a service on the cloud.

 

Some General Insights:

  • C++ is very much alive! I've been to an excellent lecture on modern C++ (the portable one, not MS specific), by Herb Sutter. Wow. So many C++ developers, the room was packed!
  • Future of Silverlight is not clear. There will be version 5 but there's no information about what's next.

Since all the videos are now available on the conference site, I strongly suggest you see the ones that are interesting for you. Note that there quite a lot.

That's it for now,
Arik Poznanski.

kick it on DotNetKicks.com Shout it

WPF Tutorial Published [HEB]

After publishing a Windows Phone tutorial and a Silverlight tutorial, I now bring you the WPF tutorial, for the sake of XAML-based technology completeness.

This 37 chapters tutorial in Hebrew completely adapted to fit WPF desktop development and using relevant source code and screenshots.

The tutorial is hosted on the great Hebrew developers community site: WebMaster.org.il

The tutorial is based on WPF 4 and it teaches desktop development from the first step, using Visual C# 2010 Express, provided freely by Microsoft.

image

Following is the index for all chapters:

    1. Introduction & Working Environment
    2. First Application
    3. XAML Language
    4. Setting Properties in XAML
    5. XAML and Code-behind C#
    6. Layout: Introduction
    7. Layout: Using StackPanel & WrapPanel
    8. Layout: Using DockPanel
    9. Layout: Using Grid
    10. Layout: Using Canvas
    11. Layout: Additional Properties
    12. Basic Controls: Introduction
    13. Basic Controls: Button controls
    14. Basic Controls: Text Controls
    15. Basic Controls: ListBox
    16. Basic Controls: ComboBox
    17. More Controls
    18. Date Controls
    19. Menu Controls
    20. Understanding ContentControl
    21. Using Dependency Properties
    22. Using Routed Events
    23. Adding Child Windows
    24. Using Resources
    25. Data Binding: Introduction
    26. Data Binding: Controlling Information Flow
    27. Data Binding: Controlling Update Time
    28. Data Binding: Defining Sources
    29. Data Binding: Using IValueConverter
    30. Data Binding: Using INotifyPropertyChanged
    31. Data Binding: Binding to Collections
    32. Using Data Templates
    33. Using Shapes
    34. Using Brushes
    35. Displaying Images and Videos
    36. Using Transformations
    37. Using Styles

     

    That's it for now,
    Arik Poznanski.

    kick it on DotNetKicks.com Shout it

    Order in Chaos: Handling unhandled exceptions in a WPF application

    Introduction

    So you want to handle somehow all the unhandled exceptions in your application.
    Usually you want to accomplish one of the following:

    • Log the exception for later diagnostics
    • Present the user an unhandled exception UI, nicer than the default

    You heard there’s an event you should register, or maybe you find one by mistake, but is it the correct one?

    Did you know there are four (!) different events for handling unhandled exceptions in the .NET framework?

    So what is the difference between them and when should we use each one?
    This post will hopefully answer these questions.

    Note: this is NOT a replacement for try-catch blocks!

     

    Summary

    I’ll begin with the summary to avoid boring busy developers.

    In a typical WPF application you should use Application.Current.DispatcherUnhandledException for exceptions generated on the UI thread and AppDomain.CurrentDomain.UnhandledException for all the other exceptions.

    Now, for the details..

     

    System.Windows.Forms.Application.ThreadException

    This event is used for catching unhandled exceptions only on UI threads created by WinForms. Other exceptions, generated on non-UI threads won’t arrive to this event. Use AppDomain.Current.UnhandledException to catch them.

    The default behavior of a WinForms application with an unhandled exception is to present the following error dialog:

    image

    If you register to this event, the application will not show the error dialog and will automatically extend the application life (i.e. the application won’t be killed).

    If you do want to end your application, maybe after logging the exception or asking the user with a personalized dialog, you must do it yourself using Application.Exit().

    You can find the MSDN documentation on this event here.

     

    System.Windows.Application.Current.DispatcherUnhandledException

    This event is used for catching unhandled exceptions only from the main UI thread created by WPF.

    The default behavior of a WPF application with an unhandled exception is to present the following error dialog and end the application:

    image

    If you register to this event, you will get the chance to log the exception, but the application will still end, unless you set e.Handled = true, on the event’s EventArgs parameter.

    You can find the MSDN documentation on this event here.

     

    Dispatcher.UnhandledException

    This event is used for catching unhandled exceptions on the thread attached to the specific Dispatcher (WPF only). Note, that in WPF two threads can have two different Dispatcher object attached. This event is only useful if you have several UI threads in your WPF application, which is quite rare. If you’re not sure, you probably need to handle only the previous event: Application.Current.DispatcherUnhandledException.

    As in the previous event, if you register, you will get the change to log the exception. To prevent the exception internal handling from being called set e.Handled = true.

    You can find the MSDN documentation on this event here.

     

    AppDomain.CurrentDomain.UnhandledException

    This event is used for catching unhandled exceptions generated from all threads running under the context of a specific application domain.

    You can find the MSDN documentation on this event here.

     

    Bonus: AppDomain.CurrentDomain.FirstChanceException

    This event which exists only from .NET 4, is raised on ANY exception, if the handled one. In fact, the event is raised before the search for the catch blocks. You can’t handle the exception using this event. You can use it if you need to log exceptions that are caught.

    You can find the MSDN documentation on this event here.

     

    That's it for now,
    Arik Poznanski.

    Silverlight Tutorial Published [HEB]

    After publishing a Windows Phone tutorial, the next logical step is a Silverlight tutorial.

    So here it is, a 40 chapters tutorial in Hebrew completely adapted to Silverlight web development and using relevant source code and screenshots.

    The tutorial is hosted on the great Hebrew developers community site: WebMaster.org.il

     

    The tutorial is based on Silverlight 4 and it teaches Silverlight web development from the first step, using Visual Web Developer 2010 Express, provided freely by Microsoft.

    Following is the index for all chapters:

    1. Introduction & Working Environment
    2. First Application
    3. XAML Language
    4. Setting Properties in XAML
    5. XAML and Code-behind C#
    6. Layout: Introduction
    7. Layout: Using StackPanel
    8. Layout: Using Grid
    9. Layout: Using Canvas
    10. Layout: Additional Properties
    11. Basic Controls: Introduction
    12. Basic Controls: Button Controls
    13. Basic Controls: Text Controls
    14. Basic Controls: ListBox
    15. Basic Controls: ComboBox
    16. More Controls
    17. Date Controls
    18. Understanding ContentControl
    19. Using Dependency Properties
    20. Using Routed Events
    21. Adding Child Windows
    22. Using Resources
    23. Data Binding: Introduction
    24. Data Binding: Controlling Information Flow
    25. Data Binding: Controlling Update Time
    26. Data Binding: Defining Sources
    27. Data Binding: Using IValueConverter
    28. Data Binding: Using INotifyPropertyChanged
    29. Data Binding: Binding to Collections
    30. Using Data Templates
    31. Using Shapes
    32. Using Brushes
    33. Displaying Images and Videos
    34. Using Transformations
    35. Using Styles
    36. Access HTML from Silverlight
    37. Access Silverlight from HTML
    38. Adding Splash Screen
    39. Creating Out-Of-Browser Application
    40. Using Isolated Storage

    Stay tuned for the WPF tutorial.

    That's it for now,
    Arik Poznanski.

    kick it on DotNetKicks.com Shout it

    New C# Forum for the Israeli Developers Community

    Following are some blog news:

    New Israeli C# Forum

    I'm proud to present a new MSDN forum in Hebrew for the C# developers community in Israel, managed by yours truly.

    The forum is available on the following link: http://social.msdn.microsoft.com/Forums/he-il/VisualCsharpil

    To all those nice developers who keep asking me C# related questions by mail, I strongly urge you to post your C# related questions on this forum.

    NOT because I don't enjoy it!

    On contrary, I love to help you and would even more enjoy it if even more people could enjoy the answers. Plus, there's more people on this forum that can help, so you will probably get an answer sooner :)

     

    In other news..

    New Windows 8 Blog

    With Build conference approaching fast, Microsoft recently opened a new blog for Windows 8 behind the scenes details. Hopefully this is a sign that Microsoft is going to raise the curtain from the mysterious Windows 8. Follow the new blog here or on their Twitter @BuildWindows8.

     

    That's it for now,
    Arik Poznanski.

    kick it on DotNetKicks.com Shout it

    Using Windows Phone As Windows 7 Accelerometer Sensor

    I just had a cool idea! (actually I had it like 6 month ago, but bear with me).

    My idea involves mixing some of the features in Windows 7 with some of the features in Windows Phone 7, to create a glorious mix!

    image

     

    Windows 7

    One of the new features in Windows 7 is the Sensor API which provides a standard interface for accessing sensors of various types, like accelerometer, etc..

    I wrote in the past about how you can consume this API from a C# application using Windows API Code Pack.

     

    Windows Phone 7

    Windows Phone 7 comes with a few sensors out of the box, among them: accelerometer!

     

    Idea

    What if we use Windows Phone 7 accelerometer sensor as a standard device on Windows 7?

     

    Roadmap

    So how can we accomplish that? let's break the idea to steps:

    Step 1: Create a software driver

    I’ll start with creating a dummy software driver. This driver will implement what's necessary to be a standard Windows 7 Accelerometer sensor, but at this stage will simply return constant data.

    In order to write a sensor driver for Windows 7 I’ll need to use User Mode Driver Framework (UMDF), a COM-like, C++ framework for writing user-mode drivers in Windows 7.

    Step 2: Transfer Windows Phone 7 sensor data into the PC

    The next step is to find a way to transfer the accelerometer data from a Windows Phone device into the PC. One possible way of doing this implementing a local WCF service on the desktop that the Phone will keep calling with accelerometer data. This will require an application to run on the phone to keep the data flowing.

    Step 3: Consume the WCF service from the phone

    Using the service from the previous step we can now consume it in a simple Windows Phone application that all it does is getting the accelerometer sensor data using the phone API and call the WCF service with the latest data.

    Step 4: Make the software driver consume the Windows Phone 7 data

    Now that I have a software driver that returns dummy accelerometer data and a way to get real accelerometer data from the Windows Phone, all I need to do is connecting the dots and make my accelerometer driver return the real data. To do this I'll need some kind of inter process communication to transfer the data from the WCF service to the driver.

     

    Long Story Short…

    I present to you the Windows Phone Accelerometer Driver for Windows 7!

    The full source code for this project can be found on the CodePlex project site.

     

    Some Implementation Details

    The actual driver was fairly easy to implement since I used the CodeProject article "Writing a Sensor Driver for the Wiimote on Windows 7" by Rajasekharan Vengalil as a base for my Windows Phone 7 driver. You can find the driver source code in the project named WP7AccelerometerDriver.

    As mentioned earlier I've implemented a simple local WCF service for transferring the accelerometer data from the phone to the driver. You can find the service source code in the project named WP7AccelerometerService. The service uses named pipes to communicate with the driver.

    The phone application is a very simple one that consumes the WCF service and call it whenever a new accelerometer value is available. You can find its source code in the project named WP7AccelerometerClient.

    Finally, if you want to check the functionality of the accelerometer driver you can use either the SensorDiagnostics project or the more fun PlaneDemo project, which I borrowed for Sergey Zwezdin blog.

     

    How to Install?

    1. Download and extract project binaries or source from the CodePlex project site.

    2. Open CMD as administrator

    3. Go to the folder \Driver\Install\

    4. According to the bitness of your OS Run install_wp7_driver_32bit.bat or install_wp7_driver_64bit.bat to install the driver.

    image 

    5. When the following notification appears, select "Install this driver software anyway":

    image
    This should take around 1-2 minutes to complete.

    6. Enable installed Sensor in the Control Panel

    image 

    7. Run the WCF service from as administrator. If you run it from Visual Studio, make sure you ran Visual Studio as administrator.

    image

     

    8. Run the Windows Phone client on a real device while connected to the PC and enter your PC (LAN) IP

    image

     

    9. That's it! you can now sit back and enjoy the ride using the PlaneDemo application or SensorDiagnostics, or any other software that uses the accelerometer sensor.

    image

    image

     

    How to Uninstall?

    If you want to uninstall the driver simply go to the Device Manager, select the "WP7 Accelerometer Sensor" device from the Sensors category, select uninstall from the context menu and make sure you mark the checkbox to delete the driver.

    image

     

    Final Note

    I've seen the project works both on a real device and using the phone emulator, however it's not a one-click install. I expect users to have problems with the installation. If you encounter some problems, please post on the CodePlex project site forum page and I'll do my best to help.

    Also, if you want to improve the source code (maybe adding GPS support?) or the installation procedure, I'll be happy to include your improvements and even include you as one of the project members on CodePlex.

    This project was pure fun since it combines many useful technologies to create real value. Among the technologies you can find: C++, COM, UMDF, C#, WCF, WP7, etc..

    That's it for now,
    Arik Poznanski.

    WPF: Dictionary Value Converter

    What’s the story?

    You want to convert an enum value to a bitmap image.

    That’s easy, here’s a solution

    Usually you would simply create a new value converter which has some custom code (e.g. a switch –case statement) to convert from the enum value to the relevant image.

    Is there a better solution?

    How many times have you written this kind of converter, the kind that takes a value and maps it to another value?

    Well, no more!

    I present to you: DictionaryValueConverter. A Converter that lets you define a collection of key-value pairs and do the mapping for you.

    So, how can I use this converter?

    The following code provides a common usage of this converter. Here I map three enum values to three different bitmap images. Each value in the Values property is another image which is mapped by its x:Key.

    <converters:DictionaryValueConverter x:Key="propertyTypeToImage">
        <converters:DictionaryValueConverter.Values>
            <BitmapImage x:Key="{x:Static local:PropertyType.Name}"
                         UriSource="Name.png" />
            <BitmapImage x:Key="{x:Static local:PropertyType.Age}"
                         UriSource="Age.png" />
            <BitmapImage x:Key="{x:Static local:PropertyType.Phone}"
                         UriSource="Phone.png" />
        </converters:DictionaryValueConverter.Values>
    </converters:DictionaryValueConverter>

    This is SO COOL, can I use it also to convert Booleans to Visibility?

    Well, yes and no.

    Theoretically, it will work. There is nothing in the code which prevents it.

    Practically, you need a way to specify the “true” and “false” Boolean values as the keys.

    Unfortunately, XAML 2006 doesn’t allow x:Key to have complex values (using property element syntax). This was fixed in XAML 2009, but WPF doesn’t support it yet.

    To work around it you can define constants for the “true” and “false” values and use x:Static markup extension to provide the keys.

    For example:

    public static class BooleanValues
    {
        public const bool True = true;
        public const bool False = false;
    }

     

    <converters:DictionaryValueConverter x:Key="booleanToVisibilityConverter">
        <converters:DictionaryValueConverter.Values>
            <Visibility x:Key="{x:Static local:BooleanValues.True}">Visible</Visibility>
            <Visibility x:Key="{x:Static local:BooleanValues.False}">Collapsed</Visibility>
        </converters:DictionaryValueConverter.Values>
    </converters:DictionaryValueConverter>

     

    So, how is it implemented?

    Like this:

    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.Linq;
    using System.Windows;
    using System.Windows.Data;

    namespace Common.Converters
    {
        public class DictionaryValueConverter : IValueConverter
        {
            /// <summary>
            /// Store the key type.
            /// Setting this property is needed if your key is an enum and  
            /// </summary>
            public Type KeyType { get; set; }

            /// <summary>
            /// Store the key-value pairs for the conversion
            /// </summary>
            public Dictionary<object, object> Values { get; set; }

            public DictionaryValueConverter()
            {
                Values = new Dictionary<object, object>();
            }

            public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
            {
                // if key type is not set, get it from the first dictionary value, usually it's the same for all the keys
                if (KeyType == null)
                {
                    KeyType = Values.Keys.First().GetType();
                }

                // if key type is an enum
                if (KeyType.IsEnum)
                {
                    // convert integral value to enum value
                    value = Enum.ToObject(KeyType, value);
                }

                // if dictionary contains the requested key
                if (Values.ContainsKey(value))
                {
                    // return the relevant value
                    return Values[value];
                }

                // otherwise, don't return a value, this will fall back to the binding FallbackValue
                return DependencyProperty.UnsetValue;
            }

            public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
            {
                // no support for converting back
                return DependencyProperty.UnsetValue;
            }
        }
    }

    You can download a demo application here.

    That’s it for now,
    Arik Poznanski.

    Windows Phone Tutorial Published [HEB]

    I've recently published a 41 chapters tutorial in Hebrew about developing application using Windows Phone. The tutorial is hosted on the great Hebrew developers community site: WebMaster.org.il

    Windows Phone Tutorial Published [HEB]

    The tutorial is based on Windows Phone Mango and it teaches Windows Phone development from the first step, using Visual Studio 2010 Express, provided freely by Microsoft.

    Windows Phone Tutorial Published [HEB]

    Following is the index for all chapters:

    1. Introduction & Working Environment
    2. First Application
    3. XAML Language
    4. Setting Properties in XAML
    5. XAML and Code-behind C#
    6. Layout: Introduction
    7. Layout: Using StackPanel
    8. Layout: Using Grid
    9. Layout: Using Canvas
    10. Layout: Additional Properties
    11. Basic Controls: Introduction
    12. Basic Controls: Button Controls
    13. Basic Controls: Text Controls
    14. Basic Controls: ListBox
    15. More Controls
    16. Web Controls
    17. Understanding ContentControl
    18. Using Dependency Properties
    19. Using Routed Events
    20. Adding Pages to the Application
    21. Using Resources
    22. Data Binding: Introduction
    23. Data Binding: Controlling Information Flow
    24. Data Binding: Controlling Update Time
    25. Data Binding: Defining Source
    26. Data Binding: Using IValueConverter
    27. Data Binding: Using INotifyPropertyChange
    28. Data Binding: Binding to Collections
    29. Using Data Templates
    30. Using Shapes
    31. Using Brushes
    32. Displaying Images and Videos
    33. Using Transformations
    34. Using Styles
    35. Using Pivot and Panorama
    36. Handle Phone Orientation
    37. Working with Application Bar
    38. Application Lifecycle
    39. Using Launchers
    40. Using Choosers
    41. Using Accelerometer Sensor

    Coming next: A Silverlight guide and a WPF guide (with technology specific details and screenshots).

    That's it for now,
    Arik Poznanski.

    kick it on DotNetKicks.com Shout it

    Using PriorityBinding in WPF – Screencast [HEB]

    In the last screencasts we've seen how to use and implement IValueConverter and how to use Multi-Binding for advanced data binding scenarios.

    This time we continue with advanced binding and explore the benefits of PriorityBinding, a useful binding gem feature that lets you define multiple sources for your binding target value, with priorities.

    Please notice that the screencast was recorded in Hebrew, but the demo is clear enough to be watched without understanding a word.

    You can watch the screencast on YouTube HD here.

    Or here, embedded in my blog:

    On my next screencast we will see how you to use Priority-Binding in a WPF application.

    That's it for now,
    Arik Poznanski.

    kick it on DotNetKicks.com Shout it

    Build 2011, Here I Come!

    BUILD 

    All is set:

    • Conference ticket – check.
    • Plane ticket – check.
    • Hotel – check.

    Build – Here I come!

    If everything goes as scheduled, in approx. a month and a half I'll be on the plane to Anaheim California, heading to the biggest conference Microsoft ever produced.

    Build (AKA PDC 2011) will be all about Windows 8.

    From some research I've done, which from obvious reasons can't be disclosed at this stage, Windows 8 is going to bring the biggest revolution since .NET was invented.

    I can't wait hearing about all the new Windows 8 feature I'll get to play with in the coming year :)

    If you're coming to the conference feel free to drop me a mail.

    That's it for now,
    Arik Poznanski.

    Using MultiBinding and IMultiValueConverter in WPF – Screencast [HEB]

    In my last two screencasts I showed how you can use and implement IValueConverter to control the data binding process.

    This time we continue our exploration of the data binding customizations and see what does multi-binding mean and how to use and implement IMultiValueConverter.

    Please notice that the screencast was recorded in Hebrew, but the demo is clear enough to be watched without understanding a word.

    You can watch the screencast on YouTube HD here.

    Or here, embedded in my blog:

     

     

    That's it for now,
    Arik Poznanski.

    kick it on DotNetKicks.com Shout it

    Implementing IValueConverter in WPF – Screencast [HEB]

    This screencast is a direct continuation of the previous one, where I showed how to use an object implementing IValueConverter in WPF. In this screencast I show how to implement IValueConverter to provide custom logic when performing data binding.

    Please notice that the screencast was recorded in Hebrew, but the demo is clear enough to be watched without understanding a word.

    You can watch the screencast on YouTube HD here.

    Or here, embedded in my blog:

     

     

    On my next screencast we will see how you to use Multi-Binding in a WPF application.

    That's it for now,
    Arik Poznanski.

    kick it on DotNetKicks.com Shout it
    More Posts Next page »