What are the equivalents for DesignTimeVisibleAttribute and ToolBoxItemAttribute in WP7?
We can use those two attri开发者_运维技巧butes to show/hide a certain control in design time, but the WP7's FCL does not include them.
What is the alternative solution?
Thanks
In short terms: how to hide a WP7 custom control from the toolbox of Visual Studio??
You could try putting this code in the constructor of your custom control:
if (DesignerProperties.IsInDesignTool)
{
this.Visibility = Visibility.Hidden;
}
IProvideAttributeTable
AttributeTableBuilder
ProvideMetadataAttribute
Just search for these three classes, that's how I fixed it.
精彩评论