简体   繁体   English

使用WPF的Visual Studio属性窗格的怪癖

[英]Quirks of Visual Studio's property pane with WPF

Working in the visual designer of a WinForm project , when one selects an element the properties pane lists all the properties for that element. WinForm项目的可视设计器中工作时,当选择一个元素时, 属性窗格将列出该元素的所有属性。 Selecting a property in the properties pane then displays a description for that property (the value of the assigned DescriptionAttribute) in a property description box immediately below the list of properties. 在属性窗格中选择一个属性,然后在属性列表下方的属性描述框中显示该属性的描述(分配的DescriptionAttribute的值)。 Even without the visual designer open, one can select another item (eg an entry in the solution explorer ) to show its properties in the properties pane and the property description box is still active and visible. 即使没有打开可视设计器,也可以选择另一项(例如, 解决方案资源管理器中的一项)以在属性窗格中显示其属性,并且属性描述框仍处于活动状态且可见。

When working in the visual design of a WPF project , on the other hand, the property description box does not appear (true for both VS2008 and VS2010). 另一方面,在WPF项目的视觉设计中工作时, 不会出现属性描述框(对于VS2008和VS2010均为true)。 Is there a way to expose it? 有没有办法揭露它? Surely it must be available, or is this a defect? 当然必须可用,或者这是缺陷吗?

The only page I could find in VS documentation is Quick Tour of the IDE that illustrates and describes each section of the visual designer -- except for the properties pane ! 我可以在VS文档中找到的唯一页面是IDE的快速浏览,该页面说明并描述了可视设计器的每个部分- 属性窗格除外


2010.02.11 Update 2010.02.11更新

Since, according to Will Eddins answer, there is no way to do this (and the situation is unchanged with the just released VS2010 release candidate) I have filed a defect report against VS2010. 根据Will Eddins的回答,由于没有方法可以做到这一点(对于刚刚发布的VS2010版本,情况没有变化),我已针对VS2010提交了缺陷报告

To show the properties pane, on the menu select View >> Properties Window. 要显示属性窗格,请在菜单上选择“视图” >>“属性窗口”。 Alternatively, press F4. 或者,按F4。

Seems to me a bug too. 在我看来也是一个错误。 I don't know if you got any answers from Microsoft Connect but I had a work-around which worked for me always. 我不知道您是否可以从Microsoft Connect得到任何答案,但是我有一个变通办法,它始终对我有用。

First, open VS2008/2010 in waiting mode(meaning; if you have set a starting project, unset it). 首先,以等待模式打开VS2008 / 2010(这意味着;如果已设置启动项目,请取消设置它)。 Go to the solution explorer panel. 转到解决方案资源管理器面板。 On the top left of the panel, you may see a box named "properties", click on it. 在面板的左上方,您可能会看到一个名为“属性”的框,单击它。 You can alternatively press Alt+Enter. 您也可以按Alt + Enter。

http://i43.tinypic.com/52nxtv.png http://i43.tinypic.com/52nxtv.png

Now, as you open the properties panel, you can see the description box down in the panel(if it is not hidden in your settings file). 现在,当您打开属性面板时,您可以在面板下方看到描述框(如果它未在您的设置文件中隐藏)。 You may have to resize it. 您可能需要调整大小。

Now load any project you want ;) 现在加载您想要的任何项目;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM