Orientation and SupportedOrientation Properties in Silverlight for WP7

Orientation specifies the orientation in which the page is shown when the app is opened.  The values that can be taken by it are “Portrait”, “PortraitUP”, “PortraitDown”, “Portrait”, “LandScapeLeft”, “LandScapeRight”,”LandScape”. SupportedOrientation specifies the orientations (landscape or portrait or both) that are supported by the app. For example, you rotate your phone – does the app respond…

1

Data Validation in Silverlight DataGrid

One of the features added to datagrid in Silverlight 3 Beta is Validation.  This can be done –          Once we modify the content of a particular cell (cell validation) –          Once we modify the content of a particular datagrid row (would like to commit changes to row) (Row Validation) In this blog, I will try…

11

SortDescriptions in Silverlight Datagrid

In Silverlight 3, we can specify add sortdescriptions indatagrid so that these columns are sorted initially when the datagrid loads. This can done in XAML as well as in code. The following code snippets demonstrate this behavior. Specifying SortDescriptions in XAML <UserControl x:Class=”SortDescriptions3.MainPage”     xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”     xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”     xmlns:data=”clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data”     xmlns:scm=”clr-namespace:System.ComponentModel;assembly=System.Windows”     >     <Grid x:Name=”LayoutRoot” Background=”White”>…

9

Grouping in Silverlight DataGrid

Silverlight 3 Beta has got a very  good response at Mix 09 conference.  There have been some additions to datagrid since Silverlight 2 RTW.  One of them  is support for Grouping – developers can specify columns by which they want to group by.  The Group definitions can be added through XAML as well as through Code.  Adding Group…

14

Silverlight Datagrid add/delete operations and ObservableCollection

In my previous post,the collection I used is a List.  So, each time I add a new item to the list, the itemsource of the datagrid need to be modified/reset to reflect the latest changes to the collection. Using the ObservableCollection gets this functionality comes free of cost/extra code for us.  The observable collection implements…

2

ScrollIntoView in Silverlight Datagrid

                Silverlight 2.0 Datagrid ships with a very cool function known as ScrollIntoView.  This function provides the functionality to bring into view (show) a particular row or column in the datagrid.  I was playing with adding rows to the datagrid, and everytime I add a row, the row gets added to the end of the…

5

Master-detail app Using two Datagrids in Silverlight

Master Detail apps are one of the popular usages of a datagrid control.  The datagrid that is shipped as part of Silverlight 2.0 RTW can be used for doing this.  Coming from the client world (winforms), I wanted to try out creating a master-detail app using the SilverLight 2.0 datagrid control.  The database I chose…

1

WebService that returns a Dataset

In this post, I describe how to create a WebService that returns a DataSet, deploying the web service, accessing the data from the webservice, and using it with winforms controls   Part1 : WebService Creation   Open VS Create new ASP.net Web Service Application Open Server Explorer Add connection to “pubs” database from the Server Explorer…

0

Adding a Web Reference to a VS 2008 Windows Forms Project

  First, we will see how to add a web service in VS2005, and then we will see what changed in VS2008 orcas. VS2005 In Visual 2005 (Whidbey), adding a Web Reference is pretty straight forward. From Project -> Add Web Reference …, (From Solution Explorer, Right Click on Project, From the drop down Menu,…

13

DataGridView in a WPF Application

  In my previous blog, I talked about a new WindowsForms Control “ElementHost” to host WPF controls inside a WindowsForms Project.  On the contrary, “WindowsFormsHost” is used to host winforms controls inside a WPF application.  WindowsFormsHost is a very important control to get the rich capabilities of WinForms world into WPF.  WPF does not have…

5