Desktop Pdc

Getting Started your Silverlight 4 with ASPHostDirectory
The whole premise of Silverlight was that it should be .NET for the browser. That is, a well-educated .NET programmer should be able to simply start a Silverlight project and work on it without knowing anything radically new.
It is arguable that Silverlight versions 1.0 through 3.0 haven’t really made this promise come true. Now we have Silverlight 4 and perhaps it is time to take the promise seriously.
Take a few simple steps and you might be surprised at just how quickly a Silverlight project can be yours and, more to the point, how little extra you need to learn.
The beta of Silverlight 4 was announced at PDC 2009 and was immediately made available for download. Perhaps more importantly, Visual Web Designer 2010 Express and Visual Studio 2010 betas both have tools incorporated that for the first time make working with Silverlight seem as easy as working with a forms or WPF-based application. Indeed, given Silverlight uses WPF, as long as you are familiar with it then creating a web application should be almost second nature.
First, download Visual Web Designer 2010 Express. You can use the full Visual Studio 2010 if you want to, but the Express version is all you need to evaluate Silverlight.
To upgrade to Silverlight 4, download the Tools for Visual Studio.
Once you have Web Designer 2010 installed, simply start a new project using File, New Project and select either Visual Basic or C# and then select the Silverlight group. Finally select Silverlight Application.
If you focus on the Silverlight application you should recognise the basic structure of a .NET application. There is the MainPage.xaml XAML file and its code behind MainPage.xaml.cs (or vb). This is where your application code mostly resides. The App.xaml and App.xaml.cs contain the code that gets your application started.
If you would like to simply run the application, use Debug,Start Debugging or press F5, then you should see a browser open with what looks like an empty page. If you dismiss the browser, or stop debugging, you can add some details to make the page look less empty. Load the MainPage.xaml file into the designer and if you are in the least bit familiar with WPF you should recognise the XAML code that generates the page.
By default a grid layout has been use and you can now use the Toolbox to drop a button onto the page. Again you should recognise the XAML code added by the designer.
Background=”White”>
HorizontalAlignment=”Left” Margin=”146,139,0,0″
Name=”button1″ VerticalAlignment=”Top” Width=”75″ />
If you now double-click on the button you will be transferred to the code editor ready to enter instructions into the button’s click event handler. To give the button something to do let’s just pop up a messagebox with a hello world message:
private void button1_Click(
object sender, RoutedEventArgs e)
{
MessageBox.Show(“Hello Silverlight World”);
}
Now if you run the application again you will see a button and if you click it then a messagebox pops up as requested.
This should seem all so familiar that it verges on the dull and boring but… notice that this now works in any browser that has a Silverlight plug-in – e.g. Firefox as well as IE. It is also a client side technology. The page that you are viewing in the browser happens to be an ASP.NET page, but if you change the URL to end .html then you will see the same button and the same behaviour.
The test website set up by the Visual Web Developer contains an ASP.NET page and a standard HTML page which can be severed by any web server. What this means is that you can integrate Silverlight, and hence .NET, with any web technology you may already be using.
You can use much of what you already know about WPF and .NET in general. For example, if you want to draw a line on the page you can use:
Line myLine = new Line();
myLine.X1 = 1;
myLine.X2 = 50;
myLine.y1 = 1;
myLine.y2 = 50;
myLine.Stroke = new SolidColorBrush(Colors.Black);
LayoutRoot.Children.Add(myLine);
This should be familiar as a use of a basic WPF drawing object, i.e. Line. The idea is you create the Line object, customise it and then add to the grid’s children after checking the XAML to discover the name generated for the grid.
If you run the program above you will find that it draws a retained mode diagonal line – i.e. there is no need to buffer the drawing to make the line persist when the page is covered, the redraw is automatic.
So what more is there to say about Silverlight? As we’ve hinted presumably you know it all already?! Well not quite. Silverlight is running in a browser and this makes a lot of difference. Your programs need to interact with the browser, its navigation and the user in ways that aren’t quite the same as when running a desktop application. In addition there is the not-unimportant fact that the Silverlight .NET Class framework isn’t an exact copy of the entire .NET Class framework that you are familiar with.
In fact you will very quickly discover that under Silverlight there are a lot of missing and modified facilities. There is much to learn if you want to make your Silverlight application standout. This short article has got you off the starting blocks – now win the race…
What is so SPECIAL on ASPHostDirectory.com Silverlight Hosting?
We know that finding a cheap, reliable web host is not a simple task so we’ve put all the information you need in one place to help you make your decision. At ASPHostDirectory, we pride ourselves in our commitment to our customers and want to make sure they have all the details they need before making that big decision.
We will work tirelessly to provide a refreshing and friendly level of customer service. We believe in creativity, innovation, and a competitive spirit in all that we do. We are sound, honest company who feels that business is more than just the bottom line. We consider every business opportunity a chance to engage and interact with our customers and our community. Neither our clients nor our employees are a commodity. They are part of our family.
The followings are the top 10 reasons you should trust your online business and hosting needs to us:
- FREE domain for Life -ASPHostDirectory gives you your own free domain name for life with our Professional Hosting Plan and 3 free domains with any of Reseller Hosting Plan! There’s no need to panic about renewing your domain as ASPHostDirectory will automatically do this for you to ensure you never lose the all important identity of your site
- 99,9% Uptime Guarantee – ASPHostDirectory promises it’s customers 99.9% network uptime! We are so concerned about uptime that we set up our own company to monitor people’s uptime for them called ASPHostDirectory Uptime
- 24/7-based Support – We never fall asleep and we run a service that is opening 24/7 a year. Even everyone is on holiday during Easter or Christmast/New Year, we are always behind our desk serving our customers
- Customer Tailored Support – if you compare our hosting plans to others you will see that we are offering a much better deal in every aspect; performance, disk quotas, bandwidth allocation, databases, security, control panel features, e-mail services, real-time stats, and service
- Money Back Guarantee – ASPHostDirectory offers a ‘no questions asked’ money back guarantee with all our plans for any cancellations made within the first 30 days of ordering. Our cancellation policy is very simple – if you cancel your account within 30 days of first signing up we will provide you with a full refund
- Experts in Silverlight Hosting – Given the scale of our environment, we have recruited and developed some of the best talent in the hosting technology that you are using. Our team is strong because of the experience and talents of the individuals who make up ASPHostDirectory
– Daily Backup Service – We realise that your website is very important to your business and hence, we never ever forget to create a daily backup. Your database and website are backup every night into a permanent remote tape drive to ensure that they are always safe and secure. The backup is always ready and available anytime you need it
– Easy Site Administration – With our powerful control panel, you can always administer most of your site features easily without even needing to contact for our Support Team. Additionally, you can also install more than 100 FREE applications directly via our Control Panel in 1 minute!
Happy Hosting!
About the Author
About ASPHostDirectory.com:
At ASPHostDirectory.com, our mission is to provide a range of innovative, reliable and easy-to-use Internet solutions to our customers and to support them with unprecedented, personalized support. For more information, visit http://www.ASPHostDirectory.com.
The PDC PSA
|
|
Dell Inspiron One 2320 23″ LCD Desktop PDC 2.6GHz 4GB 500GB DVDRW WiFi $350.00 |
|
|
HP P6644Y Desktop PDC 2.8GHz 4GB 1TB DVDRW WiFi $289.99 |
|
|
Gateway ZX6961-UB21P 23in Desktop PDC 2.6GHz 4GB 500GB $299.99 |
|
|
Dell Inspiron 545 Desktop PDC 2.7GHz 6GB 640GB DVDRW $599.99 |
|
|
Dell Inspiron 2320 23″ LCD Desktop PDC 2.6GHz 4GB 500GB DVDRW WiFi $350.00 |
|
|
Dell 2320-2800ELS 23in All In One Desktop PDC 2.6GHz 4GB *No HD DVDRW WiFi $295.00 |
|
|
Dell 2320-1100ELS 23in All In One Desktop PDC 2.6GHz 4GB *No HD DVDRW WiFi $295.00 |
|
|
Dell INSPIRON I560-887NBK PDC/3.2 4GB 500GB DESKTOP (429) w/ original warranty $379.00 |
|
|
Dell INSPIRON I560-887NBK PDC/3.2 4GB 500GB DESKTOP w/ original warranty $379.00 |
|
|
Dell INSPIRON I560-887NBK PDC/3.2 4GB 500GB DESKTOP (428) w/ original warranty $379.00 |
|
|
Dell Inspiron 2320-23″LCD Desktop PDC 2.6GHz 4GB 500GB DVDRW WiFi touchscreen $680.00 |