开发者

Control Template for Border

I would like to get a border of a particular shape, and for that, i think i need to work with the template of the border container, but i wasnt able to get the template. i tried to get the temp开发者_开发技巧late from Expression Blend, by trying to edit the border style, but wasnt able to get it. Could someone help me out as to how i can get this template?


The Border doesn't have a control template or a style because it is a decorator - it renders itself in the OnRender method.

If you need something shaped differently you will need to write your own decorator (inherit from the Decorator class). It is not very difficult. See an example here: http://blog.pixelingene.com/2007/06/balloondecorator-source-code/


Alternatively you can use a content control and place the stuff you need to be border'ed as its contents, that's a codeless way of doing things.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜