CommandGroupAttribute
public CommandGroupAttribute(string name)
public CommandGroupAttribute(string name, int order)
public CommandGroupAttribute(string name, bool isCollapsed)
public CommandGroupAttribute(string name, int order, bool isCollapsed)
パラメータ
| パラメータ名 | 説明 |
|---|---|
| name | グループ名 |
| order | 並び順 |
| isCollapsed | 起動時のグループの折りたたみ状態 |
説明
コマンドを内包するグループを指定します。
nameの指定がない場合は「Others」に内包します。
orderは指定された値の小さいグループから順に表示します。
指定がない場合は読み込み順かつorderを指定したグループよりも後ろに並びます。
isCollapsedはアプリ起動時のグループの折りたたみ状態を指定します。
trueの場合はグループ内のコマンドを非表示にする折りたたみ状態で表示します。
falseまたは指定がない場合はグループ内のコマンドを表示する展開状態で表示します。
※ユーザーが一度でもグループの展開/折りたたみ操作を行なった場合は、その状態を保存しアプリ再起動後も優先します。
※orderとisCollapsedはグループ単位で設定します。同じグループに対して複数回指定した場合、最後に読み込まれた値を適用します。
プロパティ・メソッド共に指定できます。
詳細ビューに設定状況を表示します。
#if NOA_DEBUGGER
using NoaDebugger;
public class DebugCommandSample : DebugCategoryBase
{
[CommandGroup("Group1")]
public int ExampleProperty
{
get;
set;
}
// この場合、Group2はorderを指定していないGroup1よりも前に並びます
[CommandGroup("Group2", 1)]
public int ExampleProperty2
{
get;
set;
}
// Group2は既にorderの指定を行っているため、ここで再度指定する必要はありません
[CommandGroup("Group2")]
public int ExampleProperty3
{
get;
set;
}
// この場合、Group3は起動時に折りたたまれた状態で表示します
[CommandGroup("Group3", true)]
public int ExampleProperty4
{
get;
set;
}
// Group3には既にisCollapsed=trueが設定されているため、このプロパティも起動時は折りたたまれて非表示となります
[CommandGroup("Group3")]
public int ExampleProperty5
{
get;
set;
}
}
#endif
