A Chrome and Glass Theme
- In part 1 we covered creating style resources in a resource dictionary.
- In part 2 we covered editing control templates as part of a style, including states.
- In part 3 we knocked off a couple of the easier controls to style, although we added some extra elements to the control template.
- In part 4 we are going to dig down into a control that is made up of a collection of other controls: the ListBox. But we are going to begin by styling the other controls that make up the ListBox.
jLight – Interop between Silverlight and JS based on jQuery
Interop between Silverlight and the javascript based on jQuery. The syntax used in Silverlight is as close as posible to the jQuery syntax.
Examles of regular jQuery expressions:
jQuery:jQuery("span:last").offset({left : 10, top : 100}); jQuery("div").css("border","3px solid red");jLight in Silvelight:
jQuery.Select("span:last").Offset(new {left = 10, top = 100 }); jQuery.Select("div").Css("border","3px solid red");But, with jLight you can interop between C# and javascipt. The code below runs thru each textbox and adds its value to a textbox.
jQuery.Select("input:text").Each((a, b) => { textBox1.Text += jQueryObject.FromObject(a).Val(); return false; });
Via jLight
A website that makes it easy to download and share Visual Studio color schemes
Studiostyles.info enables you to easily browse and download Visual Studio color schemes that others have already created. The color schemes work for both VS 2008 and VS 2010 (all versions – including the free VS express editions):
When do I get charged for compute hours on Windows Azure?
Nothing deployed = NO charge
Deployed and running and being used = charge
Deployed and running but no one is using it = charge
Deployed but Stopped/Suspended = charge
The system use with Azure is similar to hotel reservations. If you book a room, you get charged whether you sleep in it or not – as the hotel reserved the room for you and could not use it for another guest.
With Azure they actually reserve the physical resources for you (CPU, memory etc) as soon as you deploy. Hence they pass on the costs of those resources. This model can make Azure an expensive choice for small, rarely busy sites, for which a shared hoster model is likely much more appropriate. Azure currently is simply not intended to compete with the shared hosting model.
- Compute = $0.12 / hour
- Storage = $0.15 / GB stored / month
- Storage transactions = $0.01 / 10K
- Data transfers = $0.10 in / $0.15 out / GB – ($0.30 in / $0.45 out / GB in Asia)*
Measuring Windows Azure Consumption
- Compute time, measured in service hours: Windows Azure compute hours are charged only for when your application is deployed. When developing and testing your application, developers will want to remove the compute instances that are not being used to minimize compute hour billing. Partial compute hours are billed as full hours.
- Storage, measured in GB: Storage is metered in units of average daily amount of data stored (in GB) over a monthly period. For example, if a user uploaded 30GB of data and stored it on Windows Azure for a day, her monthly billed storage would be 1 GB. If the same user uploaded 30GB of data and stored it on Windows Azure for an entire billing period, her monthly billed storage would be 30GB. Storage is also metered in terms of storage transactions used to add, update, read and delete storage data. These are billed at a rate of $0.01 for 10,000 (10k) transaction requests
- Data transfers measured in GB (transmissions to and from the Windows Azure datacenter): Data transfers are charged based on the total amount of data going in and out of the Azure services via the internet in a given 30-day period. Data transfers within a sub region are free.
- Transactions, measured as application requests.
To get started: http://www.microsoft.com/windowsazure/offers/
MEF Programming Guide with Silverlight-specific functionality
MEF Programming Guide
- Hosting MEF in an application
- Defining Parts and Contracts
- Declaring Exports
- Declaring Imports
- Lazy Imports
- Exports and Metadata
- Using Catalogs
- Filtered Catalogs
- Part Lifetime
- Recomposition
- Querying the Composition Container
- Composition Batch
- Debugging and Diagnostics
- FAQ
Silverlight-specific functionality
Learning MEF in Silverlight 4 and .NET 4
MEF has shipped with Silverlight 4 and with .NET Framework 4.0 and there are versions on CodePlex targeting Silverlight 3 and .NET Framework V3.5 Sp1.
If you’re looking to get started with MEF then here’s some quick resources;
- Glenn Block’s new MSDN Magazine Overview Article and Glenn’s Blog
- The Overview on CodePlex
- The Programming Guide on CodePlex
- Mike Taulty’s Channel 9 Videos
but if you’re already up and running then want to know what’s new in the latest drop for the Silverlight developer?
- Updated samples!
- Renaming and changes to PartInitializer
- Renaming and moving of PartCreator
- Renaming and changes to CompositionHost.InitializeContainer
- A new DeploymentCatalog class, suport dynamically asyn load XAP files on demand!!!
For more check this out: http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2010/02/17/new-mef-drop-preview-9-on-codeplex.aspx
Using WCF RIA Services in Windows Phone 7
Unfortunately, there is no “Rich Client Experience” built-in support for Windows Phone 7 in RIA Services V1.0
With that said, you can still enable a Windows Phone 7 application to communicate with a DomainService since Windows Phone 7 has support on talking to WCF Service and here is how…
A. Let get all the tools:
- Install the latest Silverlight Tools from here (contains RIAServices, SL4 Sdk, SL4 Runtime etc)
- Install the RIA Services March 2009 Toolkit from here
- Install the Mobile Tools CTP from here
B. Create a new DomainService on server-side
C. Expose WCF endpoints: http://blogs.msdn.com/brada/archive/2010/03/29/silverlight-4-ria-services-ready-for-business-exposing-wcf-wsdl-services.aspx
D. Consume the WCF endpoints. http://blogs.msdn.com/deepm/archive/2010/03/17/configuring-your-domainservice-for-a-windows-phone-application.aspx . An example explains how you can do CRUD operation with the SOAP endpoint of a DomainService. You can find it here.
Ten Cool Features in Visual Studio 2010
1. Pinning variables when debugging
2. Box selection
Brittany Behrens from the Visual Studio Editor Team has an excellent 3 minute video that shows off a few cool VS 2010 multi-line code editing scenarios with box selection
3. On-the-fly search
When pressing Crtl and , (comma) the new Navigate To window appears. This is a real-time search window offering basically the same functionality as the Find and Replace window (opened by Crtl + Shift + F) but doing it on-the fly
4. Zooming
5. View call hierarchy
6. Sequence diagrams
7. Dependency graphs
8. IntelliTrace and dump debugging
9. Multi-monitor support
Click on the document tab or tool window and drag outside the IDE to any location on any monitor.
10. Intellisense improvements
a. When selecting any variable, all instances of it are highlighted
b. Search is not limited to prefixes
Silverlight 4 Released
Here’s some links to get you going:
- Get Started (e.g. get new tools, SDK, runtime, tutorials, other links)
- What’s New in Silverlight 4
- Breaking Changes (good to read if you’re migrating older apps to Silverlight 4)
- Offline Silverlight 4 MSDN Documentation
- Online Silverlight 4 MSDN Docs

