3
上部(全行)にカテゴリのない1つの要素と下に要素がある複数のカテゴリを表示する必要がある場合、Winforms PropertyGridをカスタマイズする方法はありますか?空の空でないカテゴリのWinForms PropertyGrid
上部(全行)にカテゴリのない1つの要素と下に要素がある複数のカテゴリを表示する必要がある場合、Winforms PropertyGridをカスタマイズする方法はありますか?空の空でないカテゴリのWinForms PropertyGrid
using System;
using System.ComponentModel;
using System.Windows.Forms;
static class Program {
[STAThread]
static void Main() {
Application.EnableVisualStyles();
using (var form = new Form {
Controls = {
new PropertyGrid { Dock = DockStyle.Fill,
SelectedObject = new Test {
Foo = "one element without category",
Bar = "several categories",
Blip = "with elements",
Blap = "inside",
Blop = "below"
}}}}) {
Application.Run(form);
}
}
}
class Test {
[Category(" ")] public string Foo { get; set; }
[Category("x")] public string Bar{ get; set; }
[Category("x")] public string Blip { get; set; }
[Category("y")] public string Blap { get; set; }
[Category("y")] public string Blop { get; set; }
}
いいえ、名前としてstring.Emptyというカテゴリを作成します。私はリンクhttp://xmages.net/storage/10/1/0/7/d/upload/5ec8a40d.pngで説明しましょう - カテゴリ内にProp1がありますが、カテゴリなしでProp1を表示したい(1つのレベルアップ)。 –
@ Lonli-Lokli - その後、 –
@Lonli - あなたはhttp://www.visualhint.com/を試すことができます –