Sunday, November 22, 2009

Session : Basics of Silverlight

Today, I had a Session on Basics of Silverlight

Highlights



Session is started after Chandershekhar's Speech on VS2010 and a Small session thereon.

  1. Start with the basics
  2. What is Silverlight?
  3. Why we use Silverlight?
  4. Framework and Architectural view of Silverlight?
  5. Sumed up with how to create a Simple Application.

The attendees are very good, there are lot of questions in this session. Unfortunately, there was some problem with my Visual Studio so, was unable to present live Demo. We decided to present a demo in next coming sessions.


We have shared all the presentation contents at : Hyderabad Techies.

There are planned session in next coming days.

You are invited to join!

Free Online Sessions

Lets finger crossed we have started Free Online Sessions

Session Details of 22nd November'2009


1. Declarative WebForms Routing by Chandrashekar Thota

2. Dynamic Metadata by Chandrashekar Thota

3. Silverlight Basics by Gaurav Arora

4. Microsoft Chart Control by Kiran Kumar Koyelada

Visit for more detail: http://hyderabadtechies.info/index.php/events

Thursday, November 19, 2009

Appreciation from DotnetSpider

Its a gain a Good Morning for me:

My hat-trick in DotNetspider

I want to share with all of you guys that in the month of october I made hat-trick, I got three consequent awards from DotNetSpider.com, for my involvement in the community.


Refer to the Announcements:

http://www.dotnetspider.com/forum/228584-Best-Forum-Supporter-Award-th-Oct-st-October.aspx

http://www.dotnetspider.com/forum/228569-Certificates-winners-sent-st-October.aspx

Saturday, October 31, 2009

Window.open method at a glance

Windo.open method is very good when we need some client scripting. Many people ask me why we the need of window.open() method we can you some others too for the purpose to open the popup windows.

Sunday, October 18, 2009

What is a Lambda expression?


A Lambda expression is nothing but an Anonymous Function, can contain expressions and statements. Lambda expressions can be used mostly to create delegates or expression tree types. Lambda expression uses lambda operator => and read as ‘goes to’ operator.
Left side of this operator specifies the input parameters and contains the expression or statement block at the right side.
Example: myExp = myExp/10;
Now, let see how we can assign the above to a delegate and create an expression tree:



delegate int myDel(int intMyNum);
static void Main(string[] args)
{
//assign lambda expression to a delegate:
myDel myDelegate = myExp => myExp / 10;
int intRes = myDelegate(110);
Console.WriteLine(”Output {0}”, intRes);
Console.ReadLine();
//Create an expression tree type
//This needs System.Linq.Expressions
Expression myExpDel = myExp => myExp /10;
}

Note:
The => operator has the same precedence as assignment (=) and is right-associative.
Lambdas are used in method-based LINQ queries as arguments to standard query operator methods such as Where.

Tuesday, September 29, 2009

Web Space, Domain Registrations, Web solutions, SEO Tips

After millions of search, I finally got the Web Hosting, Unlimited, Web Solution, SEO Tips

They provide complete solution and Web hosting of sites for multiple platforms containing all Windows, Linux under one roof.

I got a plan from there and get benefited:

They provide complete solution and Web hosting of sites for multiple platforms containing all Windows, Linux under one roof.
I got a plan from there and get benefited.

SQL Server training courses

Are you looking for SQL Server 2008 training courses ? Do you want to become a SQL Server DBA without any prior experience in IT field ?

The training will led directly by Tony John, founder and architect of dotnetspider.com. Tony John is a Microsoft MVP with over 13 years of experience in Microsoft technologies.

Click here for more details about SQL Server training courses


Saturday, August 22, 2009

How to stop Searchprotocolhost.exe on WIndowsXP?

Problem:How to stop Searchprotocolhost.exe on WIndowsXP?

Sol: Searchprotocolhost.exe is one of the reason to make your system slow. Following are the step(s) to stop this and make system fast.

1. Click Start -> Run or Press Windows + R
2. Type services.msc and press 'Ok' or click 'Enter'
3. Scroll down to find 'Windows Search' and double click
4. Stop the process

Another step to disable it from Startup:

5. Reapeat step number 1
6. Type 'msconfig' and press 'Ok' or click 'Enter'
7. Click on 'Startup' tab
8. Uncheck 'Windows Search' checkbox
9. Click Ok.

Restart your system.

To verify :

Open your TaskManager by pressing 'Ctrl+Alt+Del' and locate for Searchprotocolhost.exe in process tab.

Thursday, July 2, 2009

Debugging WCF Services : At a glance

Debugging a WCF Service

Following are the 3-different ways to start debugging a WCF service:

· When you are debugging a client process that calls a service. Here debugger steps into the service also service does not have to be in the same solution as your client application.

· When you are debugging a client process that requests to a service and here service must be a part of your solution.

· When you are using Attach to Process to attach to currently running service. Here debugging begins inside the service.

Debugging with Visual Studio 2008

Using Visual Studio 2008, one can step into a WCF service. One can hit break points inside the WCF service, if the WCF service is in the same solution as the client.

For stepping to work, you must have debugging enabled in the app.config or Web.config file we will discuss later on the limitation and how to enable debugging.

To step into a WCF Service

  1. First you need to create a Visual Studio solution that contains both the WCF client and WCF service projects.
  2. Now from Solution Explorer, right-click the WCF Client project and then click Set as Startup Project.
  3. Then enable debugging in the app.config or web.config file
  4. Mark a breakpoint at the location in the client project where you want to start stepping (just before the WCF service call).
  5. Now, Run to the breakpoint, then begin stepping. The debugger will step into the service automatically.

Limitations of Debugging a WCF Service

1. Stepping Into a Service

The following conditions should be met when you start To step into a service from a client applications:

· Service must be called bys using a synchronous client object.

· One-way contract operation is not allowed.

    • Debugging must be enabled

2. Stepping Out of a Service

The limitations are the same as described the above, in addition, here the debugger must be attached to the client.

This is because while you are debugging a client and step into a service, the debugger remains attached to the service whether you started the client by using Start Debugging or attached to the client by using Attach to Process.

But while you are debugging by attaching to the service, the debugger is not yet attached to the client. In that case, you must first use Attach to Process to attach to the client manually.

Debugging must be enabled

3. Automatic Attach to a Service

Automatically attaching to a service has the following limitations:

· In this case the service must be part of the solution you are debugging.

· The service must be hosted. Which means it may be part of a Web Site Project (File System and HTTP), Web Application Project (File System and HTTP), or WCF Service Library project. WCF Service Library projects can be either Service Libraries or Workflow Service Libraries.

· WCF client must be invoked the service.

· Debugging must be enabled

Enabling Debugging a WCF Service

Use following piece of lines in web.config or asp.config file(s):

<system.web>

<compilation debug="true" />

<system.web>

Note: In case when you use Attach to Process on a service, the debug code is automatically added to the .config file.

How to Debug a Self-Hosted WCF Service?

In simple words WCF service which does not run inside IIS, WCF service Host or ASP.NET Development Server is know as Self-Hosted Service.

To debug such services we need to configure Visual Studio to launch both client and server when you choose Start Debugging on the Debug menu.

How to start both client and host from Visual Studio?

1. Need to create a Visual Studio solution pertaining both the client and server projects.

2. Now configure the solution to start both client and server :

a. From Solution Explorer, right-click the solution name.

b. Click Set Startup Projects.

c. In Solution from Properties dialog box, select Multiple Startup Projects.

d. Click Action and choose Start from the Multiple Startup Projects grid, on the line that corresponds to the server project also on the line that corresponds to the client project, click Action and choose Start.

e. Finally click OK.

Sunday, May 31, 2009

Silverlight 3 Planned to release

As per Microsoft promise, Silverlight 3 is coming very soon. Finally, Silverlight 3 is ready to launch on July 10 including its Expression Blend Studio 3 family of designer tools.

Silverlight 3 adds some fetures:

  1. 3D Support

  2. GPU acceleration

  3. H.264 video support

  4. Out-of-browser support


out-of-browser support will allow Silverlight apps to run on Windows or Mac clients and provide users with online, offline or intermittently connected access to their Silverlight apps and content.

Right now, Silverlight 3 beta version is available for download

Sunday, May 24, 2009

Interview with Dotnetspider.com - MVM award

In continuation on my award of MVM from dotnetspider.com, DNS published my interview on this award.

In this interview I have shared my views with Raghav on my this achievement.

The tenure of interview is around 60-minutes, I really enjoyed with Raghav.

Here is the link of my interview : http://www.dotnetspider.com/forum/206904-Few-moments-with-Gaurav-Arora-DotNetSpider-MVM.aspx

Thursday, May 21, 2009

Visual Studio 2010 Beta-I : Ready to work

Its a great day for all techie today.
Microsoft released its new Visual Studion version.

Finally, Visual Studio 2010 Beta-I is released and available to download.

Get the cheat Sheet at : http://blogs.msdn.com/danielfe/archive/2009/05/20/visual-studio-2010-beta-1-cheat-sheet.aspx

Sunday, May 3, 2009

Defining and using styles in Silverlight

Defining and using styles in Silverlight



Lets take practical scenario for Styles in Silverlight.

Silverlight allows re-useable styles to be created to avoid duplication:


<Button x:Name="btnSubmit" FontFamily="Arial"
FontWeight="Bold" Width="100" Height="25"
Margin="10" />

<Button x:Name="btnCancel" FontFamily="Arial"
FontWeight="Bold" Width="100" Height="25"
Margin="10" />

We can also create Global Styles using app.xaml file


<Application.Resources>
<Style x:Key="ButtonStyle" TargetType="Button">
<Setter Property="Width" Value="100" />
</Style>
</Application.Resources>


Applying Styles to Controls:

With the help of Style property we can apply the global style to the properties:

<Button x:Name="btnSubmit" Content="Submit"
Click="btnSubmit_Click"
Style="{StaticResource ButtonStyle}" />

Silverlight : DataGrid Control

DataGrid

DataGrids are fundamental UI controls. They radically simplify the task of displaying structured data to users by automatically handling the rendering of rows, columns, headers, and data navigation. Silverlight's data grid is no exception. While it is far from being a complete or "advanced" grid control by today's WinForms and ASP.NET standards, it does provide basic grid functionality.

To use the DataGrid control, you must simply bind the Grid to a list of items (that implement IEnumerable) via the ItemSource property. In the simplest approach, the Grid will automatically generate columns based on the data you supply and even render "special" column types- like checkbox columns- based on your data types. You can, of course, take more control and manually define the columns that will be rendered in your grid by setting the AutoGenerateColumns property to false.

We have to add following namespace to use DataGrid:
xmlns:my="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"


<my:DataGrid x:Name="myDataGrid" AutoGenerateColumns="true" />

Silverlight Top 8 Frequently Asked Questions

Q. What is Silverlight Tool Kit?

Ans: To create an application or game you need to design, code and give some extra feature to your output. 

To do the above, you need some controls, IDE etc.

Silverlight Tool kit is nothing but is a collection of Silverlight Tools, Components etc. It includes source code describing the all you need to develop an application.

Please visit this link for more info:http://www.codeplex.com/Silverlight


Q. Can I add more than one .xaml pages in silverlight application?

Ans: Yes, you can have multiple .xaml files in a single project.

In the App.xaml, in the method Application_Startup you can choose, which page you want to initially display.


Q. How can I create image pieces/sub image?

Ans: In straight way you can''t create a subimage from an existing image. Here you just clip an image, Clipping is just different from Cropping. In clipping, first you have to dictate which part of the images to draw and later you have to remove all but the desired part of the image. Silverlight does not support cropping.


Q. How does Silverlight 2 differ from Adobe Flash?

Ans: As I am from .Net background so in my views you can get C# / Vb.net compiled code but in Flash there is only action script.

You can find difference in depth at : http://silverlight.net/forums/t/3015.aspx


Q. How can I switch to Expression Blend from Visual Studio?

Ans: Expression blend provide great extensibility for XAML files.To switch to Expression Blend, right-click on the XAML file and select Open in Expression Blend.


Q. What happened when I press F5 within Visual Studio to run Silverlight application?

Ans: When you run the Silverlight application within Visual Studio, a new folder created in the web-site project for silverlight solution and it happened only first time. The folder name is ClientBin and having package with XAP extension which contains compiled project.


Q. Can you elaborate how to start a silverlight application with Visual Studio?

Ans : You can find a fully described article from http://www.silverlightclub.com/resources/1858-silverlight-lets-start-building-applications.aspx.aspx

In the following step(s) I am giving the ideas all about:

1.Create a project:Here you just start your visual studio, Select your programming language [C#/VB], Choose Silverligh Template give the name and save it.

2. Adding SIlverlight COntrols:One thing is happened here, controls cannot dragged onto the designer, you can draw/drag the controls on XAML page.

(a) Naming to control:In this step just give the name to your silverligt control like for Button you can give name as : btnmySilverligtButton

(b)Adding event handlers to Silverlight controls:Here you can give the event handlers like for click etc.

(c)Testing Silverlight applications in Visual Studio:Now just press F5 and test your application


Q. What is the best place to start Silverlight application?

Ans: There is no hard and fast rule to start Silverlight application. Every developer can start as per his/her experience. like as per my case I always prefer Visual Studio. SO, in my view Visual Studio is the best place to start with Silverlight2 applications.Microsoft provides templates for creating Silverlight applications and libraries in C# and Visual Basic.