Posts

Showing posts from March, 2009

Different ways to access XML data in Silverlight Application

Image
One of the most common requirement in the Silverlight development is to load XML data in to the application. I am going to describe a few different options that we can choose based on the situations. I am using LINQ for the XML parsing in the examples. Taking a sample XML file names Sample.xml with the following content < Employees > < Employee Name ="John" /> < Employee Name ="Mark" /> < Employee Name ="David" /> </ Employees > 1. Load XML file directly from the Web Server hosted Silverlight XAP You can host the XML file at your web server itself and Silverlight application can load it on demand. To simulate this in Visual Studio you need to create a Test Website for your Silverlight application and put xml file into the ClientBin folder. Now we can write few lines of code to read the XML. WebClient will download the file asynchronously void Page_Loaded( object sender, RoutedEventArgs e) { WebClient xmlClient =

Sunny Orange - WPF Theme 1

Image
Recently I found out that I have an old blog post about Control Templating a Button, getting a lot of hits. Many out there are looking for free control templates and themes for WPF/Silverlight applications. I am planning to publish few WPF/Silverlight themes in the coming posts. So here I am publishing a simple theme which has almost similar colors to the old blog post. It contains very basic set of controls.  1)Button 2)ToggleButton 3)ComboBox 4)TextBox 5)CheckBox 6)RadioButton 7)ScrollBar 8)ScrollViewer 9)ListBox 10)ProgressBar 11)Slider You can find the source XAML style here -   SunnyOrange_Theme.xaml WPF control theming and templating is very interesting and fun task in the WPF application development, it took only an hour or two for me to create this theme file. Please let me know your valuable feedbacks and suggestions .