如何将子控件的智能标记附加到用户控件 [英] How to attach the Smart Tags of child controls, to the user control

查看:120
本文介绍了如何将子控件的智能标记附加到用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在开发一个包含TreeView控件和几个按钮等的自定义控件...
现在的问题是,如何在设计时显示TreeView的智能标签菜单?

Hello everybody,
I''m developing a custom control containing a TreeView control and a couple of buttons and etc ...
Now, the question is that how can I show the smart tags menu of the TreeView at the design time?

推荐答案

使用getter(无setter)创建公共属性并使其可浏览:
Create a public property with a getter (no setter) and make it browsable:
[Browsable(true)]
public TreeView Tree
    {
    get { return tvTree; }
    }

然后,树"项将出现在设计器的属性框中,这将是它的所有子项.
"tvTree"是您拖放到用户控件上的TreeView.

The "Tree" item will then appear in the properties box of the designer, will all it''s subitems.
"tvTree" is the TreeView you dropped onto your user control.


这篇关于如何将子控件的智能标记附加到用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆