Monday, July 19, 2010
Tuesday, July 13, 2010
Monday, June 21, 2010
Silverlight - Startup Sequence
Application Events
1. The user requests the HTML entry page in the browser.
2. The browser loads the silverlight plug-in. It then downloads the XAP file that contains your application.
3. The Silverlight plug-in reads the AppManifest.xml file from the XAP to find out what assemblies your application uses. It creates the Silverlight runtime environment and then loads your application assembly (along with any dependent assemblies).
4. The Silverlight plug-in creates an instance of your custom application class (which is defined in the App.xaml and App.xaml.cs files).
5. The default constructor of the application class raises the Startup event.
6. Your application handles the Startup event and creates the root visual object for your application.
From this point on, your page code takes over, until it encounters an unhandled error (UnhandledException) or finally ends (Exit).
These events– are the core events that the Application class provides
· Startup,
· UnhandledException, and
· Exit
Along with these standards, the Application class includes two events– that are designed for use with the out-of-browser applications
· InstallStateChanged and
· CheckAndDownloadUpdateCompleted
Regards,
Arun Manglick
Tuesday, June 8, 2010
C# 4.0 - Optional Parameters and Named Arguments
This post covers two new language feature being added to C# 4.0 – Optional Parameters & Named Arguments.
Optional Parameters
· C# 4.0 now supports using optional parameters with methods, constructors, and indexers (note: VB has supported optional parameters for awhile).
· Parameters Are Optional When A Default Value Is Specified as part of a declaration. E.g.
| | public void SendMail(string toAddress, string bodyText, bool ccAdministrator = true, bool isBodyHtml = false) { // Full implementation here } Now the call could be made as: email.SendMail("bob@foo.com", "Hello World"); email.SendMail("bob@foo.com", "Hello World", true, false); |
| | |
Note: But this approach will not let you pass the value for 4th parameter - isBodyHtml and utilize optional feature for the 3rd one. Here comes the usage of Named arguments.
Named Arguments:
· C# 4.0 also now supports the concept of “named arguments”.
· This allows you to explicitly name an argument you are passing to a method – instead of just identifying it by argument position.
· This enables us to call the above method as: Let you pass the value for 4th parameter - isBodyHtml and utilize optional feature for the 3rd one
| | email.SendMail("bob@foo.com", "Hello World", isBodyHtml: true); |
Overall, it’s by no means an earth shattering feature that is being added to the language in stand-alone scenarios
Reference : Link
Hope this helps.
Arun Manglick
Wednesday, April 14, 2010
Visual Studio 2010 and Silverlight 4 Released
04th April 2010
Microsoft today is officially launching Visual Studio (VS) 2010 .VS2010 incorporates an advanced user interface, powerful integration and customization technology, as well as improved ALM capabilities and extended support for key Microsoft developer platforms.
In addition to the VS2010 launch, Microsoft released the Final Version Of .Net Framework 4, an important update to its managed framework that delivers a host of underpinning technologies for .NET application developers.
Also released on Monday was the Final Version Of Silverlight 4, Microsoft's rich Internet application (RIA) platform. Silverlight 4 boasts key improvements for business application developers, including out-of-browser execution and improved data binding.
“The functionality of Visual Studio 2010, .NET Framework 4 and Silverlight 4 creates a powerful and unique combination, opening up new opportunities for developers to build applications that take advantage of new and existing devices, as well as Emerging Platforms Like Cloud Services.”
VS2010 in the Spotlight
· Redesigned User Interface - Based on Windows Presentation Foundation 4 (WPF4) - Precise Rich Text Handling and Multi-Monitor Support
· Managed Extensibility Framework (MEF) - Enabling third-parties to seamlessly integrate functionality to the IDE.
· Several Critical Microsoft Platforms Support - For developers creating apps for the cloud
· New Tooling For Silverlight 4, Windows Phone 7 Mobile Development and Asp.Net Model-View-Controller (MVC) projects -To separate the appearance and core business logic.
· Application Lifecycle Management (ALM)
· IntelliTrace – A “time machine” for developers and testers, captures an application's execution history – Bug can be literally played back on a tester's machine
· Enhanced Testing Features - Automate the Majority of common tasks and streamline the flow of information - led to a significant productivity increase.
· Visual Studio Team Explorer Everywhere 2010 - New collaboration product – New TFS tool for developers working outside of Visual Studio. E.g. Java development on Windows and on Mac platforms.
Reference: Link
Hope this hepls.
Arun
Thursday, April 8, 2010
Multi-Targeting Support - What Is New With (VS 2010 and .NET 4 Series)
With VS2008:
The Multi-Targeting feature introduced with VS2008. What this meant was that you could use VS 2008 to create and edit not only .NET 3.5 projects, but also .NET 3.0 and .NET 2.0 projects as well. However with the belows facts.
· .NET 2.0, .NET 3.0, and .NET 3.5 all ran on top of the Same Version Of The CLR but with Separate .NET versions Framework Libraries
· i.e. The primary difference between the .NET versions was in their framework libraries.
· As a result, Visual Studio’s compilers were able to generate the same IL output, the debugger was able to debug against the same CLR engine.
· And the IDE support for multi-targeting was primary focused on filtering out new assemblies and project templates from showing up when they weren’t supported with a given .NET version.
This multi-targeting experience worked – although it Wasn’t Perfect.
· Intellisense within VS 2008 always shows the types and members for the .NET 3.5 version of a framework library (even if you are targeting .NET 2.0).
· This means that you can sometimes inadvertently end up using a method that is only in ASP.NET 3.5 even when you are working on a ASP.NET 2.0 project.
So What Is New with VS2010?
VS2010 made major architectural changes with VS 2010 to enable much better and more accurate multi-targeting support.
· NET 4.0 has a new version number for both the Framework Libraries and CLR Engine – which means it runs completely independently from .NET 2.0, 3.0 and 3.5.
· VS 2010 now ships what we call “Reference Assemblies” for each version of .NET.
· A “reference assembly” contains only the metadata of a particular framework assembly – and not its actual implementation (making it much smaller in size on disk). This metadata is enough, though, to ensure that VS 2010 can always provide 100% accurate intellisense when targeting a particular version of the .NET framework.
· It also means that properties exposed through the property grid within designers, API listings within the Object Browser, and all the other various places within the IDE accurately reflect the exact API version signature.
Reference: Link
Hope this helps.
Arun Manglick
Wednesday, April 7, 2010
VS 2010 and .NET 4 Series
VS 2010 and .NET 4 are the next major releases of .NET framework. Together they contain a ton of new functionality and improvements, and which make building applications of all types easier, faster and better. The improvements range from nice small tweaks to major, major enhancements - and can be found across the .NET Framework, the languages, and the IDE.
Below is the list of features released as of now. However I’ll keep updating this list.
- Clean Web.Config Files (Posted Aug 25, 2009)
- Starter Project Templates (Posted August 26, 2009)
- Multi-targeting (Posted August 27th, 2009)
- Multiple Monitor Support (Posted August 31st, 2009)
- New Code Focused Web Profile Option (Posted September 2nd, 2009)
- HTML / ASP.NET / JavaScript Code Snippets (Posted September 4th, 2009)
- Auto-Start ASP.NET Applications (Posted September 15th, 2009)
- URL Routing with ASP.NET 4 Web Forms (Posted October 13th, 2009)
- Searching and Navigating Code in VS 2010 (Posted October 21st, 2009)
- VS 2010 Code Intellisense Improvements (Posted October 22nd, 2009)
- WPF 4 (Posted October 26th, 2009)
- Add Reference Dialog Improvements (Posted October 29th, 2009)
- SEO Improvements with ASP.NET 4 (Posted Jan 5th, 2010)
- Output Cache Extensibility with ASP.NET 4 (Posted Jan 27th, 2010)
- Built-in Charting Controls for ASP.NET and Windows Forms (Posted Feb 7th, 2010)
- Cleaner HTML Markup with ASP.NET 4 - Client IDs (Posted March 30th, 2010)
- Optional Parameters and Named Arguments in C# 4 - and a cool scenarios with ASP.NET MVC 2 (Posted April 2nd, 2010)
- Automatic Properties, Collection Initializers and Implicit Line Continuation Support with VB 2010 (Posted April 5th, 2010)
- New <%: %> Syntax for HTML Encoding Output using ASP.NET 4 (Posted April 6th, 2010)
You can learn more about VS 2010 and .NET 4 Beta 2 and download it for free here.
Reference: Link
Hope this helps,
Arun Manglick