2017-04-25 65 views
0

我在Visual Studio Community 2017中使用了VB.NET。我注意到在某些情況下,對象的可用屬性和方法列表不完整。IntelliSense中屬性/方法的不完整列表

一個例子可以看這裏: enter image description here

如圖所示,我想用dgv對象的RowCount特性,那就是System.Windows.Forms.DataGridView類型。你可以看到,在它的正上方,物業在那裏,工作正常,我可以手工輸入。在後臺編譯器(缺乏更好的術語)之前,它只需要一兩秒鐘就可以確認它是正確的。這種行爲混淆了打字流程,因爲通常IntelliSense會自動將它認爲是拼寫錯誤的內容進行自動更正。

注意:這不是排除所示的屬性。我注意到了其他的例子,還有函數調用和其他隨機的地方,但是我找不到什麼是缺失和不是什麼的明確方法。

環顧四周,我發現this question,但它涉及一個完全不同的問題。

這只是Visual Studio中的一個錯誤(如果是這樣,它是否在某處報告?),有人可以證實這一點,並確實有人知道修復?

回答

0

阿爾巴諾Gheller張貼在Visual Studio Community page答案。

引述他和修復的必要步驟:

I've fixed the problem in this way: 

1. I've exported my settings from Tool - Import/Export settings 
2. I've set the property HideAdvancedMembers = true inside 
    <ToolsOptionsSubCategory name="Basic" RegisteredName="Basic" PackageName="Text Management Package"> 
    because C# has true and works 
3. I've imported this modified settings. 

所以總結:

找到部分:導出設置文檔的Basic ToolsOptionsSubCategory <PropertyValue name="HideAdvancedMembers">false</PropertyValue>。 將其更改爲<PropertyValue name="HideAdvancedMembers">true</PropertyValue>,保存並重新導入設置。

我不知道爲什麼隱藏成員會導致顯示更多成員,但無論如何;-)

1

按照你的步驟,我得到了和你一樣的結果,我已經向VS產品團隊報告了這個問題,請檢查:VS 2017--VB: the intellisense for the DataGridView control not works like VS 2015,你可以投票或添加評論,然後我們需要等待確認來自VS產品團隊,感謝您的反饋。 enter image description here 同時,我試圖在C#> Windows窗體應用程序和智能感知正常工作,就像2015年VS

+0

好有獨立的確認。也許你可以添加到報告中,它不是datagridview控件的孤立問題。我會看到,當我偶然發現他們時,我收集了更多的例子。 – Jens

+0

@Jens,如果你發現任何更多的控制,請隨時讓我知道,我會更新該線程,使VS產品團隊知道它,在此先感謝:) –

+0

另一個例子是任何控制'ClientRectangle'屬性,例如'Button1.ClientRectangle' – Jens