开发者

WPF: Making an element not appear as public or friend?

In the designer, how can I (for instance) make a button be private within the Window that 开发者_开发技巧it is on? I remember a way to do this in Windows Forms, but I don't know how in WPF.

Is there a way to do it through Visual Studio?


Try using

<Button x:FieldModifier="private" />

On your object element.

This doesn't appear to be baked right into the designer where you can just edit it in the Properties Editor. You'll have to add this to the markup yourself. However, it is supported so at least you can get intellisense to help you put it there.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜