开发者

problem with animating resizing agdatagridcolumn !

开发者 https://www.devze.com 2023-03-14 09:35 出处:网络
i want resize width of agdatagridcolumn in a agdatagrid with animation code : (CreateStb(agdatagrid)).Begin();//Exceptin: Cannot resolve TargetProperty Widthonspecified object.

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

精彩评论

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