如何访问附加到UI元素的行为?

时间:2011-07-07 12:19:35

标签: silverlight dependency-properties behavior

例如,我有这个:

Border myBorder = new Border();
...
designArea.Children.Add(myBorder);

ResizeAndMoveBehavior b = new ResizeAndMoveBehavior();
b.CurrentProperties = thisButtonProperties;
b.Attach(myBorder);

现在,当我从designArea的子节点获取myBorder时,如何访问附加到myBorder的行为的CurrentProperties?

1 个答案:

答案 0 :(得分:2)