WPF and ToolboxItem(false)

2019-06-25 13:09发布

I'm setting ToolboxItem(false) attribute on couple of classes in my control library to prevent the from being added to Toolbox. This attribute works perfectly well with ASP.NET designer but with WPF designer it seems to have no effect.

Is there some other way to achieve this with WPF or is just unsupported?

1条回答
乱世女痞
2楼-- · 2019-06-25 13:31

Found the answer myself. You should use ToolboxBrowsable(false) attribute from Microsoft.Windows.Design namespace rather than ToolboxItem(false) from System.ComponentModel.

查看更多
登录 后发表回答