MenuItemStyleCollectionEditor クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
関連付けられているMenuItemStyleCollection コントロール内のMenu オブジェクトのコンポーネント エディターを提供します。
public ref class MenuItemStyleCollectionEditor : System::ComponentModel::Design::CollectionEditor
public class MenuItemStyleCollectionEditor : System.ComponentModel.Design.CollectionEditor
type MenuItemStyleCollectionEditor = class
inherit CollectionEditor
Public Class MenuItemStyleCollectionEditor
Inherits CollectionEditor
- 継承
例
次のコード例では、 EditorAttribute 属性を使用して、 MenuItemStyleCollectionEditor クラスと UITypeEditor クラス (コレクション エディター基本クラス) を、 WebControl クラスから派生したカスタム コントロール内のプロパティに関連付け、 MenuItemStyleCollection コレクションを取得および設定する方法を示します。
private MenuItemStyleCollection menuItemStyles;
// Associate the MenuItemStyleCollectionEditor with the
// LevelMenuItemStyles.
[Editor(typeof(System.Web.UI.Design.WebControls.
MenuItemStyleCollectionEditor),
typeof(UITypeEditor))]
public MenuItemStyleCollection LevelMenuItemStyles
{
get { return menuItemStyles; }
set { menuItemStyles = value; }
} // LevelMenuItemStyles
Private menuItemStyles As MenuItemStyleCollection
' Associate the MenuItemStyleCollectionEditor with the
' LevelMenuItemStyles.
<EditorAttribute( GetType(System.Web.UI.Design.WebControls. _
MenuItemStyleCollectionEditor), _
GetType(UITypeEditor))> _
Public Property LevelMenuItemStyles() As MenuItemStyleCollection
Get
Return menuItemStyles
End Get
Set
menuItemStyles = value
End Set
End Property ' LevelMenuItemStyles
注釈
MenuItemStyleCollectionEditor クラスは、関連付けられたMenuItemStyle コントロール内のMenuItemStyleCollection オブジェクトのMenu要素をデザイン時に、MenuDesigner オブジェクトのコントロールの下で編集するためのユーザー インターフェイスを提供します。
MenuItemStyleCollection コントロールの各LevelMenuItemStylesプロパティとLevelSelectedStylesプロパティに関連付けられたMenuがあります。 これらの MenuItemStyleCollection オブジェクトは、メニュー構造のレベル (入れ子の深さ) に依存するメニュー項目にスタイルを適用するために使用されます。
MenuItemStyleCollectionEditorは、たとえば、ビジュアル デザイナーのプロパティ グリッドの LevelMenuItemStyles または LevelSelectedStyles 行の省略記号ボタン (...) を選択することによって呼び出されます。
CanSelectMultipleInstances メソッドは常にfalseを返し、エディターで一度に選択できるオブジェクトは 1 つだけであることを示します。
CreateCollectionForm メソッドは、現在のMenuItemStyleCollectionを表示および編集するための新しいフォームを作成します。
CreateInstance メソッドは、指定したコレクション項目の種類の新しいインスタンスを作成します。 CreateNewItemTypes メソッドは、エディターが作成できる型の配列を返します。
コンストラクター
| 名前 | 説明 |
|---|---|
| MenuItemStyleCollectionEditor(Type) |
MenuItemStyleCollectionEditor クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| CollectionItemType |
コレクション内の各項目のデータ型を取得します。 (継承元 CollectionEditor) |
| CollectionType |
コレクション オブジェクトのデータ型を取得します。 (継承元 CollectionEditor) |
| Context |
現在のコンテキストを示す型記述子を取得します。 (継承元 CollectionEditor) |
| HelpTopic |
エディターのダイアログ ボックスの [ヘルプ] ボタンまたは F1 キーが押されたときのヘルプ トピックまたはトピックの一覧を表示するヘルプ キーワードを取得します。 (継承元 CollectionEditor) |
| IsDropDownResizable |
ユーザーがドロップダウン エディターのサイズを変更できるかどうかを示す値を取得します。 (継承元 UITypeEditor) |
| NewItemTypes |
このコレクションに対して作成できる項目の使用可能な型を取得します。 (継承元 CollectionEditor) |