简体   繁体   English

Visual Studio 错误列表,如工具窗口

[英]Visual studio error list like toolwindow

Does anyone knows how to create VSIX plugin with visual studio build error list like toolwindow.有谁知道如何使用 Visual Studio 构建错误列表(如工具窗口)创建 VSIX 插件。 It should contain the grid like image1 but when i add a WPF grid view to toolwindow it is not the same grid in visual studio (image 2)它应该包含像 image1 这样的网格,但是当我向工具窗口添加 WPF 网格视图时,它与 Visual Studio 中的网格不同(图 2)

image1图片1

image2图像2

you can use the following method to retrieve related errorlist, then add the result to custom tool window.您可以使用以下方法检索相关错误列表,然后将结果添加到自定义工具窗口。

DTE2 dte = (DTE2)this.ServiceProvider.GetService(typeof(DTE));
        ErrorList errList = dte.ToolWindows.ErrorList;
        List<string> list = new List<string>();

       int  count = errList.ErrorItems.Count;
        if (count != 0)
        {
            for (int i = 1; i <= count; i++)
            {
                list.Add(errList.ErrorItems.Item(i).Description.ToString());
            }
        }

Here is a demo about Adding Search to a Tool Window for your reference.这是一个关于将搜索添加到工具窗口的演示供您参考。

https://msdn.microsoft.com/en-us/library/hh266761.aspx https://msdn.microsoft.com/en-us/library/hh266761.aspx

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

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