HotSpotCollection 클래스

정의

ImageMap 컨트롤에 있는 HotSpot 개체의 컬렉션을 나타냅니다. 이 클래스는 상속될 수 없습니다.

public ref class HotSpotCollection sealed : System::Web::UI::StateManagedCollection
public sealed class HotSpotCollection : System.Web.UI.StateManagedCollection
type HotSpotCollection = class
    inherit StateManagedCollection
Public NotInheritable Class HotSpotCollection
Inherits StateManagedCollection
상속
HotSpotCollection

예제

다음 코드 예제에는 프로그래밍 방식으로 만드는 방법을 보여 줍니다는 ImageMap 제어 하 고 두 개의 추가 CircleHotSpot 개체를 합니다. HotSpots 속성을 사용 액세스는 HotSpotCollection 컬렉션에 대 한를 ImageMap 제어 하 고 추가 CircleHotSpot 개체를 합니다. 이 예제가 제대로 작동 하려면 사용자 고유의 이미지를 제공 해야 합니다는 ImageUrl 속성 경로 업데이트 된 이미지를 적절 하 게 애플리케이션에서 찾을 수 있도록 합니다.

<%@ page language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
  void Page_Load (Object sender, EventArgs e)
  {
    // Programmatically create an ImageMap control.
    ImageMap Shop = new ImageMap();
    
    // Set properties on the ImageMap control.
    Shop.ImageUrl = "Images/ShopChoice.jpg";
    Shop.AlternateText = "Shopping choices";

    // Add the ImageMap control to the 
    // Controls collection of the page.
    Page.Controls.Add(Shop);

    // Programmatically create a CircleHotSpot object.
    CircleHotSpot Circle1 = new CircleHotSpot();
    Circle1.HotSpotMode = HotSpotMode.Navigate;
    Circle1.NavigateUrl = "http://www.tailspintoys.com";
    Circle1.X = 145;
    Circle1.Y = 120;
    Circle1.Radius = 75;
    Circle1.AlternateText = "Shop for toys";

    // Add Circle1 to the ImageMap's HotSpotCollection.    
    Shop.HotSpots.Add(Circle1);

    // Programmatically create a second CircleHotSpot object.
    CircleHotSpot Circle2 = new CircleHotSpot();
    Circle2.HotSpotMode = HotSpotMode.Navigate;
    Circle2.NavigateUrl = "http://www.cohowinery.com";
    Circle2.X = 145;
    Circle2.Y = 290;
    Circle2.Radius = 75;
    Circle2.AlternateText = "Shop for wine";

    // Add Circle2 to the ImageMap's HotSpotCollection.    
    Shop.HotSpots.Add(Circle2);
  }

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="head1" runat="server">
  <title>ImageMap Class C# Constructor Example</title>
</head>
  <body>
    <form id="form1" runat="server">
    
      <h3>ImageMap Class C# Constructor Example</h3>
      
      <h4>Shopping Choices:</h4>
      
    </form>      
  </body>
</html>
<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
  
  Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
    
    ' Programmatically create an ImageMap control.
    Dim Shop As New ImageMap
    Shop.ImageUrl = "Images/ShopChoice.jpg"
    Shop.AlternateText = "Shopping choices"
    
    ' Add the ImageMap control to the 
    ' Controls collection of the page.
    Page.Controls.Add(Shop)
    
    ' Programmatically create a CircleHotSpot object.
    Dim Circle1 As New CircleHotSpot
    Circle1.HotSpotMode = HotSpotMode.Navigate
    Circle1.NavigateUrl = "http://www.tailspintoys.com"
    Circle1.X = 145
    Circle1.Y = 120
    Circle1.Radius = 75
    Circle1.AlternateText = "Shop for toys"
    
    ' Add Circle1 to the ImageMap's HotSpotCollection.    
    Shop.HotSpots.Add(Circle1)
    
    ' Programmatically create a second CircleHotSpot object.
    Dim Circle2 As New CircleHotSpot
    Circle2.HotSpotMode = HotSpotMode.Navigate
    Circle2.NavigateUrl = "http://www.cohowinery.com"
    Circle2.X = 145
    Circle2.Y = 290
    Circle2.Radius = 75
    Circle2.AlternateText = "Shop for wine"

    
    ' Add Circle2 to the ImageMap's HotSpotCollection.    
    Shop.HotSpots.Add(Circle2)
    
  End Sub
  
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="head1" runat="server">
  <title>ImageMap Class VB Constructor Example</title>
</head>
  <body>
    <form id="form1" runat="server">
    
      <h3>ImageMap Class VB Constructor Example</h3>
      
      <h4>Shopping Choices:</h4>
      
    </form>      
  </body>
</html>

설명

HotSpotCollection 클래스 수 있도록 하는 컬렉션을 나타냅니다는 ImageMap 목록을 유지 관리 하는 컨트롤을 HotSpot 포함 된 개체입니다.

사용 합니다 Add 메서드를 지정 된 추가 HotSpot 개체를 컬렉션의 서 수 인덱스 배열 끝입니다. 사용 하 여는 Insert 메서드를 추가 HotSpot 개체를 컬렉션의 지정 된 인덱스 위치에 있습니다. 사용 하 여는 Item[] 직접 액세스 하는 인덱서를 HotSpot 간단한 배열 표기법을 사용 하 여 지정 된 인덱스 컬렉션에 있는 개체입니다.

사용 하 여는 Remove 제거할 메서드는 HotSpot 개체 컬렉션의 끝에서 합니다. 사용 하 여는 RemoveAt 제거 하는 방법을 HotSpot 개체에서 지정된 된 인덱스 위치입니다.

생성자

HotSpotCollection()

HotSpotCollection 클래스의 새 인스턴스를 초기화합니다.

속성

Count

StateManagedCollection 컬렉션에 포함된 요소의 개수를 가져옵니다.

(다음에서 상속됨 StateManagedCollection)
Item[Int32]

HotSpot 컬렉션의 지정된 인덱스에서 HotSpotCollection 개체에 대한 참조를 가져옵니다.

메서드

Add(HotSpot)

지정된 HotSpot 개체를 HotSpotCollection 컬렉션의 끝에 추가합니다.

Clear()

StateManagedCollection 컬렉션에서 모든 항목을 제거합니다.

(다음에서 상속됨 StateManagedCollection)
CopyTo(Array, Int32)

특정 배열 인덱스부터 StateManagedCollection 컬렉션의 요소를 배열에 복사합니다.

(다음에서 상속됨 StateManagedCollection)
CreateKnownType(Int32)

파생 클래스에서 재정의된 경우 IStateManager를 구현하는 클래스의 인스턴스를 만듭니다. 만들어진 개체의 형식은 GetKnownTypes() 메서드에서 반환된 컬렉션의 지정된 멤버를 기반으로 합니다.

(다음에서 상속됨 StateManagedCollection)
Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetEnumerator()

StateManagedCollection 컬렉션을 반복하는 반복기를 반환합니다.

(다음에서 상속됨 StateManagedCollection)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetKnownTypes()

파생 클래스에서 재정의된 경우 StateManagedCollection 컬렉션에 포함할 수 있는 IStateManager 형식의 배열을 가져옵니다.

(다음에서 상속됨 StateManagedCollection)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
Insert(Int32, HotSpot)

지정된 HotSpot 개체를 HotSpotCollection 컬렉션의 지정된 인덱스 위치에 삽입합니다.

MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
OnClear()

파생 클래스에서 재정의된 경우 Clear() 메서드가 컬렉션에서 항목을 모두 제거하기 전에 추가 작업을 수행합니다.

(다음에서 상속됨 StateManagedCollection)
OnClearComplete()

파생 클래스에서 재정의된 경우 Clear() 메서드가 컬렉션에서 항목을 모두 제거한 후 추가 작업을 수행합니다.

(다음에서 상속됨 StateManagedCollection)
OnInsert(Int32, Object)

파생 클래스에서 재정의된 경우 IList.Insert(Int32, Object) 또는 IList.Add(Object) 메서드가 컬렉션에 항목을 추가하기 전에 추가 작업을 수행합니다.

(다음에서 상속됨 StateManagedCollection)
OnInsertComplete(Int32, Object)

파생 클래스에서 재정의된 경우 IList.Insert(Int32, Object) 또는 IList.Add(Object) 메서드가 컬렉션에 항목을 추가한 후 추가 작업을 수행합니다.

(다음에서 상속됨 StateManagedCollection)
OnRemove(Int32, Object)

파생 클래스에서 재정의된 경우 IList.Remove(Object) 또는 IList.RemoveAt(Int32) 메서드가 컬렉션에서 지정한 항목을 제거하기 전에 추가 작업을 수행합니다.

(다음에서 상속됨 StateManagedCollection)
OnRemoveComplete(Int32, Object)

파생 클래스에서 재정의된 경우 IList.Remove(Object) 또는 IList.RemoveAt(Int32) 메서드가 컬렉션에서 지정한 항목을 제거한 후에 추가 작업을 수행합니다.

(다음에서 상속됨 StateManagedCollection)
OnValidate(Object)

파생 클래스에서 재정의된 경우 StateManagedCollection 컬렉션 요소의 유효성을 검사합니다.

(다음에서 상속됨 StateManagedCollection)
Remove(HotSpot)

HotSpot 컬렉션에서 지정된 HotSpotCollection 개체를 제거합니다.

RemoveAt(Int32)

컬렉션의 지정된 인덱스 위치에서 HotSpot 개체를 제거합니다.

SetDirty()

전체 StateManagedCollection 컬렉션이 뷰 상태에 직렬화되도록 합니다.

(다음에서 상속됨 StateManagedCollection)
SetDirtyObject(Object)

파생 클래스에서 재정의된 경우 변경 정보만 기록하는 대신 전체 상태를 뷰 상태에 기록하도록 컬렉션에 포함된 object에 지시합니다.

(다음에서 상속됨 StateManagedCollection)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

명시적 인터페이스 구현

ICollection.Count

StateManagedCollection 컬렉션에 포함된 요소의 개수를 가져옵니다.

(다음에서 상속됨 StateManagedCollection)
ICollection.IsSynchronized

StateManagedCollection 컬렉션이 동기화되어 스레드로부터 안전하게 보호되는지 여부를 나타내는 값을 가져옵니다. 이 메서드는 항상 false를 반환합니다.

(다음에서 상속됨 StateManagedCollection)
ICollection.SyncRoot

StateManagedCollection 컬렉션에 대한 액세스를 동기화하는 데 사용할 수 있는 개체를 가져옵니다. 이 메서드는 항상 null를 반환합니다.

(다음에서 상속됨 StateManagedCollection)
IEnumerable.GetEnumerator()

StateManagedCollection 컬렉션을 반복하는 반복기를 반환합니다.

(다음에서 상속됨 StateManagedCollection)
IList.Add(Object)

StateManagedCollection 컬렉션에 항목을 추가합니다.

(다음에서 상속됨 StateManagedCollection)
IList.Clear()

StateManagedCollection 컬렉션에서 모든 항목을 제거합니다.

(다음에서 상속됨 StateManagedCollection)
IList.Contains(Object)

StateManagedCollection 컬렉션에 특정 값이 있는지 여부를 확인합니다.

(다음에서 상속됨 StateManagedCollection)
IList.IndexOf(Object)

StateManagedCollection 컬렉션에서 지정한 항목의 인덱스를 확인합니다.

(다음에서 상속됨 StateManagedCollection)
IList.Insert(Int32, Object)

항목을 StateManagedCollection 컬렉션 내의 지정한 인덱스에 삽입합니다.

(다음에서 상속됨 StateManagedCollection)
IList.IsFixedSize

StateManagedCollection 컬렉션의 크기가 고정되어 있는지 여부를 나타내는 값을 가져옵니다. 이 메서드는 항상 false를 반환합니다.

(다음에서 상속됨 StateManagedCollection)
IList.IsReadOnly

StateManagedCollection 컬렉션이 읽기 전용인지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 StateManagedCollection)
IList.Item[Int32]

지정된 인덱스에 있는 IStateManager 요소를 가져옵니다.

(다음에서 상속됨 StateManagedCollection)
IList.Remove(Object)

StateManagedCollection 컬렉션에서 맨 처음 발견되는 지정된 개체를 제거합니다.

(다음에서 상속됨 StateManagedCollection)
IList.RemoveAt(Int32)

지정한 인덱스에 있는 IStateManager 요소를 제거합니다.

(다음에서 상속됨 StateManagedCollection)
IStateManager.IsTrackingViewState

StateManagedCollection 컬렉션에서 해당 뷰 상태의 변경 내용을 저장하는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 StateManagedCollection)
IStateManager.LoadViewState(Object)

이전에 저장된 StateManagedCollection 컬렉션과 이 컬렉션에 포함된 IStateManager 항목의 뷰 상태를 복원합니다.

(다음에서 상속됨 StateManagedCollection)
IStateManager.SaveViewState()

페이지가 서버에 포스트백된 이후에 발생한 StateManagedCollection 컬렉션과 이 컬렉션에 포함된 각 IStateManager 개체의 변경 내용을 저장합니다.

(다음에서 상속됨 StateManagedCollection)
IStateManager.TrackViewState()

StateManagedCollection 컬렉션과 이 컬렉션에 포함된 각 IStateManager 개체가 해당 뷰 상태의 변경 내용을 추적하여 같은 페이지에서 발생하는 여러 요청에 대해 유지할 수 있도록 합니다.

(다음에서 상속됨 StateManagedCollection)

확장 메서드

Cast<TResult>(IEnumerable)

IEnumerable의 요소를 지정된 형식으로 캐스팅합니다.

OfType<TResult>(IEnumerable)

지정된 형식에 따라 IEnumerable의 요소를 필터링합니다.

AsParallel(IEnumerable)

쿼리를 병렬화할 수 있도록 합니다.

AsQueryable(IEnumerable)

IEnumerableIQueryable로 변환합니다.

적용 대상

추가 정보