problem with animating resizing agdatagridcolumn !!

Posted by mahdokht on Stack Overflow See other posts from Stack Overflow or by mahdokht
Published on 2011-06-22T08:00:41Z Indexed on 2011/06/22 8:22 UTC
Read the original article Hit count: 142

Filed under:

i want resize width of agdatagridcolumn in a agdatagrid with animation code :

 (CreateStb(agdatagrid)).Begin();//Exceptin: Cannot resolve TargetProperty Width on specified object.
.
.
Private StoaryBoard CreateStb(UIElement element)
{
  Storyboard stb = new Storyboard();
  DoubleAnimation dbAnmtin = new DoubleAnimation();
  Storyboard.SetTarget(dbAnmtin, (AgDataGridColumn)((AgDataGrid)element).Columns[0]);
  Storyboard.SetTargetProperty(dbAnmtin, new PropertyPath("Width"));
  dbAnmtin1.To=//custom value
  dbAnmtin1.Duration=//custom value
  stb.Children.Add(dbAnmtin);
  Return stb;
}

I think defining TargetProperty has a problem but I don’t know how to solve it . plz help me

© Stack Overflow or respective owner

Related posts about Silverlight