开发者

problem with animating resizing agdatagridcolumn !

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 prob开发者_如何学JAVAlem but I don’t know how to solve it . plz help me


Check your documentation for AgDataGridColumn, is the Width property implemented as a DependencyProperty ? You can only animate dependency propeties.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜