{"id":3464,"date":"2009-09-30T17:39:11","date_gmt":"2009-09-30T17:39:11","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/2009\/09\/30\/visual-studio-2010-property-grid-filtering\/"},"modified":"2009-09-30T17:39:11","modified_gmt":"2009-09-30T17:39:11","slug":"visual-studio-2010-property-grid-filtering","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/visual-studio-2010-property-grid-filtering\/","title":{"rendered":"Visual Studio 2010 Property Grid Filtering"},"content":{"rendered":"<p>Visual Studio 2010 improves .NET framework multi-targeting by applying framework-appropriate filtering to the property grid and Intellisense.<\/p>\n<p>For example, if you select a button on a web form of a .NET 2.0 web project, in the Property Grid you&nbsp; will see:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/Button20_2.jpg\"><img decoding=\"async\" style=\"border-right-width: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px\" border=\"0\" alt=\"Button20\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2009\/09\/Button20_thumb.jpg\" width=\"217\" height=\"541\"><\/a> <\/p>\n<p>If you go to the Project Properties and change the Target Framework version to 4.0:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/sel_framework_2.jpg\"><img decoding=\"async\" style=\"border-right-width: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px\" border=\"0\" alt=\"sel_framework\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2009\/09\/sel_framework_thumb.jpg\" width=\"260\" height=\"110\"><\/a> <\/p>\n<p>&#8230;the Property Grid display will change to display 4.0-specific properties:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/Button40_2.jpg\"><img decoding=\"async\" style=\"border-right-width: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px\" border=\"0\" alt=\"Button40\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2009\/09\/Button40_thumb.jpg\" width=\"215\" height=\"576\"><\/a> <\/p>\n<p>While this looks simple and straight-forward, there&#8217;s actually an illusion at work!&nbsp; Only one framework can be loaded into an AppDomain at a time, and Visual Studio uses .NET 4.0 specific capabilities.&nbsp; So the actual controls displayed on the design surface are always 4.0 controls.&nbsp; Their properties are filtered for display in the Property Grid and Intellisense to match the Target Framework displayed in the Project Properties.<\/p>\n<p>Setting the Target Framework in the Project Properties writes to the targetFramework attribute of the compilation tag in web.config file as well.&nbsp; The web.config setting is used by the build system, which is responsible for generating the errors and warnings that appear in the Error List.&nbsp; So do <u>not<\/u> manually change the Target Framework by hand-editing the web.config file, use the Project Properties instead.&nbsp; This will ensure that the entire project system is using the same setting.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio 2010 improves .NET framework multi-targeting by applying framework-appropriate filtering to the property grid and Intellisense. For example, if you select a button on a web form of a .NET 2.0 web project, in the Property Grid you&nbsp; will see: If you go to the Project Properties and change the Target Framework version to [&hellip;]<\/p>\n","protected":false},"author":404,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[7345,7322,7323,7324,7267,7268,7282],"class_list":["post-3464","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-multitargeting","tag-vank","tag-visual-studio-2010","tag-vs10","tag-vwd","tag-web","tag-web-config"],"acf":[],"blog_post_summary":"<p>Visual Studio 2010 improves .NET framework multi-targeting by applying framework-appropriate filtering to the property grid and Intellisense. For example, if you select a button on a web form of a .NET 2.0 web project, in the Property Grid you&nbsp; will see: If you go to the Project Properties and change the Target Framework version to [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/3464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/404"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=3464"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/3464\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=3464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=3464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=3464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}