DesignerActionItemCollection 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
개체의 DesignerActionItem 컬렉션을 나타냅니다.
public ref class DesignerActionItemCollection : System::Collections::CollectionBase
public class DesignerActionItemCollection : System.Collections.CollectionBase
type DesignerActionItemCollection = class
inherit CollectionBase
Public Class DesignerActionItemCollection
Inherits CollectionBase
- 상속
예제
다음 코드 예제에서는 스마트 태그 목록을 만들기 위해 만들고 DesignerActionItemCollection 채우는 방법을 보여 줍니다. 이 코드 예제는 클래스에 제공된 더 큰 예제의 DesignerActionItem 일부입니다.
public override DesignerActionItemCollection GetSortedActionItems()
{
DesignerActionItemCollection items = new DesignerActionItemCollection();
//Define static section header entries.
items.Add(new DesignerActionHeaderItem("Appearance"));
items.Add(new DesignerActionHeaderItem("Information"));
//Boolean property for locking color selections.
items.Add(new DesignerActionPropertyItem("LockColors",
"Lock Colors", "Appearance",
"Locks the color properties."));
if (!LockColors)
{
items.Add(new DesignerActionPropertyItem("BackColor",
"Back Color", "Appearance",
"Selects the background color."));
items.Add(new DesignerActionPropertyItem("ForeColor",
"Fore Color", "Appearance",
"Selects the foreground color."));
//This next method item is also added to the context menu
// (as a designer verb).
items.Add(new DesignerActionMethodItem(this,
"InvertColors", "Invert Colors",
"Appearance",
"Inverts the fore and background colors.",
true));
}
items.Add(new DesignerActionPropertyItem("Text",
"Text String", "Appearance",
"Sets the display text."));
//Create entries for static Information section.
StringBuilder location = new StringBuilder("Location: ");
location.Append(colLabel.Location);
StringBuilder size = new StringBuilder("Size: ");
size.Append(colLabel.Size);
items.Add(new DesignerActionTextItem(location.ToString(),
"Information"));
items.Add(new DesignerActionTextItem(size.ToString(),
"Information"));
return items;
}
Public Overrides Function GetSortedActionItems() _
As DesignerActionItemCollection
Dim items As New DesignerActionItemCollection()
'Define static section header entries.
items.Add(New DesignerActionHeaderItem("Appearance"))
items.Add(New DesignerActionHeaderItem("Information"))
'Boolean property for locking color selections.
items.Add(New DesignerActionPropertyItem( _
"LockColors", _
"Lock Colors", _
"Appearance", _
"Locks the color properties."))
If Not LockColors Then
items.Add( _
New DesignerActionPropertyItem( _
"BackColor", _
"Back Color", _
"Appearance", _
"Selects the background color."))
items.Add( _
New DesignerActionPropertyItem( _
"ForeColor", _
"Fore Color", _
"Appearance", _
"Selects the foreground color."))
'This next method item is also added to the context menu
' (as a designer verb).
items.Add( _
New DesignerActionMethodItem( _
Me, _
"InvertColors", _
"Invert Colors", _
"Appearance", _
"Inverts the fore and background colors.", _
True))
End If
items.Add( _
New DesignerActionPropertyItem( _
"Text", _
"Text String", _
"Appearance", _
"Sets the display text."))
'Create entries for static Information section.
Dim location As New StringBuilder("Location: ")
location.Append(colLabel.Location)
Dim size As New StringBuilder("Size: ")
size.Append(colLabel.Size)
items.Add( _
New DesignerActionTextItem( _
location.ToString(), _
"Information"))
items.Add( _
New DesignerActionTextItem( _
size.ToString(), _
"Information"))
Return items
End Function
생성자
| Name | Description |
|---|---|
| DesignerActionItemCollection() |
DesignerActionItemCollection 클래스의 새 인스턴스를 초기화합니다. |
속성
| Name | Description |
|---|---|
| Capacity |
포함할 수 있는 CollectionBase 요소의 수를 가져오거나 설정합니다. (다음에서 상속됨 CollectionBase) |
| Count |
인스턴스에 포함된 CollectionBase 요소 수를 가져옵니다. 이 속성은 재정의할 수 없습니다. (다음에서 상속됨 CollectionBase) |
| InnerList |
인스턴스의 ArrayList 요소 CollectionBase 목록을 포함하는 항목을 가져옵니다. (다음에서 상속됨 CollectionBase) |
| Item[Int32] |
지정된 인덱스에서 요소를 가져오거나 설정합니다. |
| List |
인스턴스의 IList 요소 CollectionBase 목록을 포함하는 항목을 가져옵니다. (다음에서 상속됨 CollectionBase) |
메서드
| Name | Description |
|---|---|
| Add(DesignerActionItem) |
제공된 DesignerActionItem 값을 현재 컬렉션에 추가합니다. |
| Clear() |
인스턴스에서 모든 개체를 CollectionBase 제거합니다. 이 메서드는 재정의할 수 없습니다. (다음에서 상속됨 CollectionBase) |
| Contains(DesignerActionItem) |
특정 요소가 포함되어 있는지 여부를 DesignerActionItemCollection 확인합니다. |
| CopyTo(DesignerActionItem[], Int32) |
지정된 배열 인덱스에서 시작하여 현재 컬렉션의 요소를 제공된 배열에 복사합니다. |
| Equals(Object) |
지정한 개체와 현재 개체가 같은지 여부를 확인합니다. (다음에서 상속됨 Object) |
| GetEnumerator() |
인스턴스를 반복하는 열거자를 반환합니다 CollectionBase . (다음에서 상속됨 CollectionBase) |
| GetHashCode() |
기본 해시 함수로 작동합니다. (다음에서 상속됨 Object) |
| GetType() |
현재 인스턴스의 Type 가져옵니다. (다음에서 상속됨 Object) |
| IndexOf(DesignerActionItem) |
컬렉션에서 특정 항목의 인덱스를 결정합니다. |
| Insert(Int32, DesignerActionItem) |
지정된 인덱스에 요소를 DesignerActionItemCollection 삽입합니다. |
| MemberwiseClone() |
현재 Object단순 복사본을 만듭니다. (다음에서 상속됨 Object) |
| OnClear() |
인스턴스의 CollectionBase 내용을 지울 때 추가 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnClearComplete() |
인스턴스의 CollectionBase 내용을 지워서 추가 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnInsert(Int32, Object) |
인스턴스에 새 요소를 CollectionBase 삽입하기 전에 추가 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnInsertComplete(Int32, Object) |
인스턴스에 새 요소를 CollectionBase 삽입한 후 추가 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnRemove(Int32, Object) |
인스턴스에서 CollectionBase 요소를 제거할 때 추가 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnRemoveComplete(Int32, Object) |
인스턴스에서 CollectionBase 요소를 제거한 후 추가 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnSet(Int32, Object, Object) |
인스턴스에서 CollectionBase 값을 설정하기 전에 추가 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnSetComplete(Int32, Object, Object) |
인스턴스에서 CollectionBase 값을 설정한 후 추가 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| OnValidate(Object) |
값의 유효성을 검사할 때 추가 사용자 지정 프로세스를 수행합니다. (다음에서 상속됨 CollectionBase) |
| Remove(DesignerActionItem) |
에서 특정 개체의 첫 번째 항목을 제거합니다 DesignerActionItemCollection. |
| RemoveAt(Int32) |
인스턴스의 지정된 인덱스에 있는 요소를 제거합니다 CollectionBase . 이 메서드는 재정의할 수 없습니다. (다음에서 상속됨 CollectionBase) |
| ToString() |
현재 개체를 나타내는 문자열을 반환합니다. (다음에서 상속됨 Object) |
명시적 인터페이스 구현
확장명 메서드
| Name | Description |
|---|---|
| AsParallel(IEnumerable) |
쿼리의 병렬 처리를 사용하도록 설정합니다. |
| AsQueryable(IEnumerable) |
IEnumerable IQueryable변환합니다. |
| Cast<TResult>(IEnumerable) |
IEnumerable 요소를 지정된 형식으로 캐스팅합니다. |
| OfType<TResult>(IEnumerable) |
지정된 형식에 따라 IEnumerable 요소를 필터링합니다. |