Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

Silverlight 4 – Simple Configuration Manager

AddThis Social Bookmark Button
Unlike the full framework, Silverlight 4 doesn’t have built in support to read from an application configuration file – the System.Configuration.ConfigurationManager isn’t part of the framework. Of course, Silverlight is a bit different to other applications where users may need to gain access to an app.config file but nevertheless it’s sometimes nice to store and retrieve configuration data in a familiar way. So here’s a quick and easy way to do it. Add an XML file to the root of your Silverlight project, rename it to app.config and set it’s build action to Resource.
Whack in some appSettings in the same way you would a normal configuration file.
Now create your very own ConfigurationManager class (note, you’ll need to add have a reference to System.Xml.Linq).
using System; using System.Windows; using System.Collections.Generic; ...(Read whole news on source site)

Home : Blog List : Andrew Tokeley : Silverlight 4 – Simple Configuration Manager