Friday, July 31, 2009

Silverlignt How To Get The Cell Content Of The DataGrid When AutoGenerateColumns Set True

private void dg_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
           TextBlock tb = dg.Columns[0].GetCellContent(e.AddedItems[0]) as TextBlock;
           //tb.text will hold the Column Content
}


Wednesday, July 29, 2009

Create GIF Animations Online

Now you can create animated pictures and animated effects from your photos, for free. LooGix.com is a web service that allows you create GIF Animations online without downloading anything.

Getting AG_E_PARSER_BAD_PROPERTY_VALUE Error

Reason For Getting This Error "AG_E_PARSER_BAD_PROPERTY_VALUE"

I) Haven't defined the event handler in code behind, but have assigned it in xaml
II) not setting the correct event args type on the handler

How To Change the start page Silverlight XAML

Go to app.xaml.cs, find Application_Startup, set your xaml page which you want to run during startup.

app.xaml.cs
private void Application_Startup(object sender, StartupEventArgs e)
{
// this.RootVisual = new Page(); // Default
this.RootVisual = new UserDefinedXaml(); // Changed Xaml, if u add UserDefinedXaml.xaml to your project.
}


app.xaml.vb
Private Sub Application_Startup(ByVal o As Object, ByVal e As StartupEventArgs) Handles Me.Startup
Me.RootVisual = New UserDefinedXaml()
End Sub

Tuesday, July 28, 2009

How To Round Off The Decimal String

Math.Round(Convert.ToDouble("17.8"));

OutPut : 18