Friday, May 20, 2011

First day experience with MVP Open Days

After not being talked for long, you might be thinking what will be coming next as article. Well, there are still quite a few topics in mind and some of few I have already started working, and will  be soon be coming to my blog; but for  now I am now very much excited to share what is happening with me in Microsoft MVP Open days I am here in Hydrabad with you, and I am sure you will also enjoy reading it.

So if you only want to look for some technical ones, I would recommend you to select some other post on the website which are entirely suit you. If you are in a mood to relax, you can go on reading this post and enjoy.

What is MVP Open Days ?

Being an MVP is always a great achievelt to me. The first day I got the notification that I got MVP I wonder what would be the benefits that I will get after being an MVP. Being an MVP is not only one of the prestigious award that one can get working on Microsoft technologies, it is something more. You get special previledges from microsoft to get in touch with product teams, you get all the microsoft softwares for free and also you are invited to some of the global events that microsoft is organizing. Well, you can say MVP Open Days is one of such an event. In MVP open days we have been invited to take part of discussions on very recent ideas of what Microsoft is going to do (dont ask me about it as its under NDA) but also has a chance to networking with some of the peoples whom you would have admired from the early days of your career. Being a part of this elite group, I cannot miss this opportunity to come to hyderabad and move on with the event.

Thursday, May 5, 2011

DLR in C# using Scripting Language

You should note, till now C# has very little Dynamic Language feature. As mentioned in PDC, we will soon have the feature Compiler as Service feature in C# it is really hard to wait for such a thing to happen. As for me, after the dynamic capabilities released with C# 4.0, I was really excited to look deep into it to find out what is possible. In my Internals series, I have already mentioned you some of the details of what is implemented inside of C# to achieve the Dynamic capabilities in the language. The introduction of ExpandoObject and DynamicObject classes and also with the Expression Trees gives an edge to dynamism in C# but still there is something missing in the language.  There is still something missing which will eval a script and return the result as every scripting engine does, like javascript.

Even though there is no comparison between javascript and C# as both are completely different, whereas the former is completely type unsafe and interpreted language while later being strongly typed language, still I want more from the language. One might think, we could dynamically compile the objects either using Reflection.Emit or Expression Trees and evaluate the statements using Reflection apis, but believe me, it is not the right way to go as the complexity will increase very fast.

For such a scenarios, where you dare to find some expression evaluator from C#, it is better to use some scripting languages which runs inside .NET environment, yet allows you to use DLR capabilities. One of such language is IronPython.

Tuesday, May 3, 2011

My 17 .NET Tips on Silverlight ASP.NET Windows Phone C# From DailyDotNetTips.com

Daily .NET Tips is aiming to sharing useful coding tips and tricks for .NET Developers. This site completely design for sharing Tips and Tricks, useful Code Snippet which anyone use in daily development work and targeted anything related with .NET. In the past few months I have share many tips over there, just giving quick link of them

BannerTips #1 : How to Customize On-Screen Keyboard Layout in Windows Phone 7 application ?

Tips #2 : How to use Application Bar in Windows Phone 7 Application ?

Tips #3 : AncestorType in RelativeSource – Silverlight 5

Tips #4 : RichTextBoxOverflow Control in SilverLight 5

Tips #5 : Binding in Style Setters – SilverLight 5 Beta

Tips #6 : Implicit DataTemplates for Control in Silverlight 5 Beta

Tips #7 : Collection Initializers in .NET

Tips #8 : Working with TypeDescriptor in C#

Tips #9 : Pixel Scrolling for WPF Lists

Tips #10 : Getting Lazy with .NET 4.0

Tips #11 : Annonymous objects in C#

Tips #12 : InputBinding for WPF and Silverlight with MVVM

Tips #13 : How to deal with CPU usage in WPF application ?

Tips #14 : Handoff Behavior in WPF Animation

Tips #15 : Lazy Load XAML content from External File and Vice Versa

Tips #16 : Publish Desktop Application – SmartClient

Tips #17 : Different approaches to Casting

You can find all my posts in the site from the following link :
http://dailydotnettips.com/author/abhishek-sur/

To learn more .NET Tips Daily Visit http://dailydotnettips.com and Follow @DailyDotNetTips at Twitter

Thanks

Monday, May 2, 2011

Creating Animated Splash screen in Windows Phone 7

Creating a beautiful splash screen is always great to see for any application. Windows Phone 7 being no exception to it, you want to give the user great look and feel while loading the application using your Splash Screens. In this article, I am going to spend some time by talking about some of the probable options that you have to create your own Splash Screen for your windows phone 7 application.

What is Splash Screen?

Splash screen is the first screen that comes as an introduction to the application before the application gets on executing. During the application loads up into memory there are lot of things happen in background. The process is created in memory, memory blocks are allocated, Virtualized File System gets initialized etc. During these phase of loading the application, the application hung up and the user sees the black screen. If this wait becomes too long, the user gets frustrated and might stop using the application as well. The Mobile Marketplace also puts a threshold of 10 seconds in which your application must load, otherwise your application will be rejected from App Store. During this phase, if you show some nice little splash screen to the user without hampering the normal loading of the application, the user will feel much more comfortable with your application.

In this post I will demonstrate how you can create / use splash screen for your windows Phone 7 application and the different approaches available to you for this.



Basically there are two options available before you which will allow you to show your customized splash screen :


Saturday, April 30, 2011

How to Customize On-Screen Keyboard Layout in Windows Phone 7 application ?

While you want to enter some text in your Windows Phone 7 application, the first thing that you will notice is your very own on – screen keyboard. As Windows Phone 7 mobile have a very large screen area, most of the phones does not have an analog keyboard associated with it. Hence your application should provide provision to handle keyboard events directly using on-screen keyboards. There are few flexibilities available to you while you define your input scope, in this post I will demonstrate them with an example.

What is InputScope?

InputScope is a special functionality to the developers to customize how the layout of the keyboard appear to the user while entering data into that particular textbox. Hence you can easily customize the On-Screen Keyboard for your input so that one can easily feed in data fast and easy. For instance, say if you want to take phone number as input,you need only digits and some special characters to be available, on the other hand, email needed alphanumeric characters with @ as symbol. Silverlight introduces the new option to let you specify the InputScope for a particular input. Lets look into the code below :

Thursday, April 28, 2011

Async support for Silverlight and WP7

Async support in C# language brings the new life to the modern application development to bring forth the same technique of writing your code and bring asynchrony easily. The main focus of async ctp is to ornament the language in such a way so that the developer could seamlessly create applications that brings asynchrony yet not dealing with its complexity. Hence using the new technique, asynchrony could easily achieved in a program without refactoring the whole program with lots of callbacks and method calls. I have already talked about it in a separate article. If you don’t know, please visit “Async CTP 5.0”.


Async CTP is released again recently and announced in MIX 11. Just after it is released, the first thing that everyone looks for is what is new in the release. As a matter of fact, I did jumped back to see them but eventually found out that there is nothing new in this build in terms of new features is concerned but the release focuses on fixes of performance adding debugging capabilities etc. I will definitely look back to them later in another post, but in this post I am going to talk about another important thing that featured with this release. As opposed to the previous release, the current release now supports Silverlight and Windows Phone 7 environments. This seems to be interesting.

What is Asynchrony?

The word asynchrony means something that is running without blocking other operations running in parallel. If you have created a background Thread to process some data, you are actually doing asynchronous job in background as your foreground operation does not get hampered. In vNext C# introduces Asynchrony using TPL. The two new keywords “async” and “await” could be used to make one sequential method asynchronous. Hence the new way of developing asynchronous program replaces the traditional approach where we needed to refactor the code totally to gain asynchrony in our application. Basically, this is done using the StateMachine to store the entire method into a form of states, and each states are delegated into batch of statements. The Task.ContinueWith is used in the system to ensure that the method body gets executed sequentially. Yes, it’s a compiler trick. If you want to know more about it, please read through my entire article on “Async CTP”.

Wednesday, April 27, 2011

Application Bar for your Windows Phone 7

If you are working with Windows Phone 7, the first thing that you should have noticed is the very own Application bar. Application Bar is present in most of the applications that you use in your Windows Phone 7. This is basically a standard Toolbar with a menu associated with it which allows you to enumerate the commonly used commands in a standard location. While creating your application, Microsoft strongly recommends you to add an application bar, to ensure the user have common behaviour for every application. You can think Application bar similar to TaskBar of windows.

Components of Application Bar

An application Bar is made up with two components:

1. ApplicationBar Buttons
2. ApplicationBar Menu


The applicationbar buttons are always visible for an application which is used to list only the items that needed to be frequently used while dealing with the application. Lets say you create a Text processing application, you can list the File->Open and File-Save commands as ApplicationBarButtons.

ApplicationBarMenu pops up when the user clicks on either the blank space of the application bar or the special button with 3 dots. The Application Menu is used to list the items that are not used often but needed sometimes in the context.

Author's new book

Abhishek authored one of the best selling book of .NET. It covers ASP.NET, WPF, Windows 8, Threading, Memory Management, Internals, Visual Studio, HTML5, JQuery and many more...
Grab it now !!!