A Chrome and Glass Theme

image  image

  1. In part 1 we covered creating style resources in a resource dictionary.
  2. In part 2 we covered editing control templates as part of a style, including states.
  3. In part 3 we knocked off a couple of the easier controls to style, although we added some extra elements to the control template.
  4. 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("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

When do I get charged for compute hours on Windows Azure?

Windows Azure Pricing
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.


Windows Azure Pricing

  • 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

  1. Hosting MEF in an application
  2. Defining Parts and Contracts
  3. Declaring Exports
  4. Declaring Imports
  5. Lazy Imports
  6. Exports and Metadata
  7. Using Catalogs
  8. Filtered Catalogs
  9. Part Lifetime
  10. Recomposition
  11. Querying the Composition Container
  12. Composition Batch
  13. Debugging and Diagnostics
  14. FAQ

Silverlight-specific functionality

  1. Hosting MEF in Silverlight using CompositionInitializer
  2. Overriding the default host configuration
  3. Dynamic Instantiation and ExportFactory<T>
  4. Application partitioning with DeploymentCatalog

Also MEF Programming Guide – pdf

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;

  1. Glenn Block’s new MSDN Magazine Overview Article and Glenn’s Blog
  2. The Overview on CodePlex
  3. The Programming Guide on CodePlex
  4. 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?

  1. Updated samples!
  2. Renaming and changes to PartInitializer
  3. Renaming and moving of PartCreator
  4. Renaming and changes to CompositionHost.InitializeContainer
  5. 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