Winform PropertyGrid绑定问题 [英] Winform PropertyGrid binding problem
本文介绍了Winform PropertyGrid绑定问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法让Winform PropertyGrid
使用静态字段:
Is there a way to make a Winform PropertyGrid
work with static fields :
public class Config
{
public static string ServerName = "localhost";
}
推荐答案
本身可以正常使用:
It is possible in normal way itself :
public static string m_ServerName = "localhost";
public string ServerName //Read and Write
{
get { return m_ServerName; }
set { m_ServerName = value; }
}
public static string m_DisplayServerName = "localhost";
public string DisplayServerName //Read Only
{
get { return m_DisplayServerName; }
}
这篇关于Winform PropertyGrid绑定问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文