我的资源文件有问题.
我有两个项目的解决方案.第一个项目包含ImageResource.resx带有我使用的图像的文件.Form此项目中的每个人都可以从设计器访问此文件.但我可以在设计器ImageResource.resx文件中看到从第二个项目中使用它(参考第二个项目存在).
我已将该ImageResource.resx文件添加为第二个项目的链接.我在设计师看到了它!但是当我在第二个项目中使用来自此资源的图像时,Visual Studio修改了我的原始文件(它设置名称空间,以及其他...),我的解决方案中断了.Visual Studio也告诉我,ImageResource.resx它存在于两个dll first_project.dll和second_project.dll
任何人都可以帮助我如何在项目之间正确使用共享资源?
(抱歉英文不好)
我重新涂漆时的性能存在很大问题DataGridView.
我正在使用a DataGridView来显示来自外部应用程序流的日志.来自流的消息以高频率(小于1毫秒)进入.如果我DataGridView在每条新消息到来时立即添加新行,DataGridView则在下一条消息到来之前没有时间重新绘制自己.
一种可能的解决方案是使用队列来收集消息,并使用队列中的消息DataGridView每100毫秒重新绘制一次.这很好但是DataGridView当它自动滚动到最后一行时闪烁.(禁用平滑滚动)
你能帮助我改善DataGridView表现吗?
我怎样才能获得PropertyDescriptor当前的房产?例如:
[MyAttribute("SomeText")]
public string MyProperty
{
get{....}
set
{
// here I want to get PropertyDescriptor for this property.
}
}
Run Code Online (Sandbox Code Playgroud) 你能解释一下"财产:"这个词是什么意思吗?
[property: NotifyParentProperty( true )]
public string Filename
{
get;
set;
}
Run Code Online (Sandbox Code Playgroud) 我需要将TreeView(Windows窗体)从TOP滚动到BOTTOM ...
我应该澄清一下,我有两个TreeViews ......如果第一个是由用户滚动的,那么第二个treeView必须自动滚动.我不知道选择了什么节点...
我怎样才能做到这一点?
我怎样才能获得坐标ToolStripButton?
我有一个PropertyGrid分配给它的一些对象.
var prpGrid = new PropertyGrid();
prp.SelectedObject = myObject;
Run Code Online (Sandbox Code Playgroud)
我想得到所有网格项,我可以得到selectedGridItem属性:
var selectedProperty = prpGrid.SelectedGridItem;
Run Code Online (Sandbox Code Playgroud)
我可以这样做吗?
我有一些卷曲的问题..
我可以在我的文档顶部为类定义别名,例如
using MyName = Bla.Bla.ClassNameRun Code Online (Sandbox Code Playgroud)
但是我可以在方法中定义这样的东西吗?
我需要将a绑定List<MyClass> myList到a DataGridView.并在结果表中输入两列ID和Name.
代码片段:
private List<MyClass> myList = new List<MyClass>(){...};
public void BindClass()
{
dataGridView.DataSource = myList;
}
public MyClass
{
public MyDataClass Data{ get; set; }
}
public MyDataClass
{
public string ID { get; set; }
public string Name { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
可能吗?
据我所知,Application.Restart()重新启动一个应用程序并创建一个新的应用程序实例.此实例是否会在新流程中创建,或者将使用旧流程?
谢谢你的回答.
c# ×8
.net ×6
winforms ×5
datagridview ×2
.net-3.5 ×1
alias ×1
attributes ×1
class ×1
coordinates ×1
data-binding ×1
paint ×1
properties ×1
propertygrid ×1
repaint ×1
using ×1