WizardStepCollection 클래스

정의

마법사로 작동하는 컨트롤에서 WizardStepBase 파생 개체의 컬렉션을 나타냅니다. 이 클래스는 상속될 수 없습니다.

public ref class WizardStepCollection sealed : System::Collections::IList
public sealed class WizardStepCollection : System.Collections.IList
type WizardStepCollection = class
    interface IList
    interface ICollection
    interface IEnumerable
Public NotInheritable Class WizardStepCollection
Implements IList
상속
WizardStepCollection
구현

예제

다음 예제에서는 채우는 방법을 보여 줍니다는 WizardStepCollection 선언적 구문을 사용 하 여 컬렉션입니다.

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
      <asp:Wizard id="Wizard1" 
        runat="server" >
        <WizardSteps>
          <asp:WizardStep id="Step1" 
            runat="server" 
            title="Step 1">
          </asp:WizardStep>
          <asp:WizardStep id="Step2" 
            runat="server" 
            title="Step 2">
          </asp:WizardStep>
          <asp:WizardStep id="Step3" 
            runat="server" 
            title="Step 3">
          </asp:WizardStep>
          <asp:WizardStep id="Step4" 
            runat="server" 
            title="Step 4">
          </asp:WizardStep>
          <asp:WizardStep id="Step5" 
            runat="server" 
            title="Step 5">
          </asp:WizardStep>
          <asp:WizardStep id="Step6" 
            runat="server" 
            title="Step 6">
          </asp:WizardStep>
        </WizardSteps>
        <HeaderTemplate>
          <b>WizardStepCollection Example</b>
        </HeaderTemplate>
      </asp:Wizard>
    </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">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
      <asp:Wizard id="Wizard1" 
        runat="server" >
        <WizardSteps>
          <asp:WizardStep id="Step1" 
            runat="server" 
            title="Step 1">
          </asp:WizardStep>
          <asp:WizardStep id="Step2" 
            runat="server" 
            title="Step 2">
          </asp:WizardStep>
          <asp:WizardStep id="Step3" 
            runat="server" 
            title="Step 3">
          </asp:WizardStep>
          <asp:WizardStep id="Step4" 
            runat="server" 
            title="Step 4">
          </asp:WizardStep>
          <asp:WizardStep id="Step5" 
            runat="server" 
            title="Step 5">
          </asp:WizardStep>
          <asp:WizardStep id="Step6" 
            runat="server" 
            title="Step 6">
          </asp:WizardStep>
        </WizardSteps>
        <HeaderTemplate>
          <b>WizardStepCollection Example</b>
        </HeaderTemplate>
      </asp:Wizard>
    </form>
  </body>
</html>

다음 예제에서는 프로그래밍 방식으로 채우는 방법을 WizardStepCollection 컬렉션입니다.

<%@ Page Language="C#" CodeFile="WizardStepCollection.cs" Inherits="WizardStepCollectioncs_aspx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>WizardStepCollection Example</title>
</head>
<body>
    <form id="Form1" runat="server">
      <h3>WizardStepCollection Example</h3>
      <asp:PlaceHolder id="PlaceHolder1" 
        runat="server" />
    </form>
  </body>
</html>
<%@ Page Language="VB" CodeFile="WizardStepCollection.vb" Inherits="WizardStepCollectionvb_aspx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>WizardStepCollection Example</title>
</head>
<body>
    <form id="Form1" runat="server">
      <h3>WizardStepCollection Example</h3>
      <asp:PlaceHolder id="PlaceHolder1" 
        runat="server" />
    </form>
  </body>
</html>

다음은 앞의 예제에서 웹 페이지에 대 한 코드 숨김 파일입니다.

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class WizardStepCollectioncs_aspx : System.Web.UI.Page
{ 

    void Page_Load(object sender, EventArgs e)
    {
        // Programmatically create a wizard control.
        Wizard Wizard1 = new Wizard();

        // Create steps for the wizard control and insert them
        // into the WizardStepCollection collection.
        for (int i = 0; i <= 5; i++)
        {
            WizardStepBase newStep = new WizardStep();
            newStep.ID = "Step" + (i + 1).ToString();
            newStep.Title = "Step " + (i + 1).ToString();
            Wizard1.WizardSteps.Add(newStep);
        }

        // Display the wizard control on the Web page.
        PlaceHolder1.Controls.Add(Wizard1);
    }
}
Partial Class WizardStepCollectionvb_aspx
    Inherits System.Web.UI.Page

    Public Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

        ' Programmatically create a wizard control.
        Dim Wizard1 As Wizard = New Wizard()

        ' Create steps for the wizard control and insert them
        ' into the WizardStepCollection collection.
        For i As Integer = 0 To 5
            Dim newStep As WizardStepBase = New WizardStep()
            newStep.ID = "Step" + (i + 1).ToString()
            newStep.Title = "Step " + (i + 1).ToString()
            Wizard1.WizardSteps.Add(newStep)
        Next

        ' Display the wizard control on the Web page.
        PlaceHolder1.Controls.Add(Wizard1)

    End Sub

End Class

설명

WizardStepCollection 클래스 저장 하 고 컬렉션을 관리 하는 데 사용 됩니다 WizardStepBase-는 마법사와 같은 역할 하는 컨트롤에 개체를 파생 합니다 CreateUserWizard 컨트롤 또는 Wizard 컨트롤입니다. 예를 들어 합니다 Wizard 컨트롤이 사용 하는 WizardStepCollection 클래스에 대 한 해당 WizardSteps 속성입니다.

여러 가지 방법으로 액세스할 수 있습니다 합니다 WizardStepBase-파생 개체를 WizardStepCollection:

  • 사용 하 여는 Item[] 직접 액세스 하는 속성을 WizardStepBase-특정 인덱스에서 개체를 파생 합니다.

  • 사용 된 GetEnumerator 컬렉션을 반복 하는 데 사용할 수 있는 열거자를 만드는 방법.

  • 사용 하 여는 CopyTo 의 내용을 복사 하는 메서드를 WizardStepCollection 컬렉션을 Array 개체.

속성

Count

WizardStepBase 컨트롤의 Wizard 컬렉션에 있는 WizardStepCollection 파생 개체의 수를 가져옵니다.

IsReadOnly

컬렉션에 있는 WizardStepBase 파생 개체를 수정할 수 있는지 여부를 나타내는 값을 가져옵니다.

IsSynchronized

해당 컬렉션에 대한 액세스가 동기화되어 스레드로부터 안전하게 보호되는지 여부를 나타내는 값을 가져옵니다.

Item[Int32]

컬렉션의 지정된 인덱스에 있는 WizardStepBase 파생 개체를 가져옵니다.

SyncRoot

컬렉션에 대한 액세스를 동기화하는 데 사용할 수 있는 개체를 가져옵니다.

메서드

Add(WizardStepBase)

지정된 WizardStepBase 파생 개체를 컬렉션의 끝에 추가합니다.

AddAt(Int32, WizardStepBase)

지정된 WizardStepBase 파생 개체를 컬렉션의 지정된 인덱스 위치에 추가합니다.

Clear()

컬렉션에서 WizardStepBase 파생 개체를 모두 제거합니다.

Contains(WizardStepBase)

WizardStepCollection 컬렉션에 특정 WizardStepBase 파생 개체가 있는지 여부를 확인합니다.

CopyTo(WizardStepBase[], Int32)

대상 배열의 지정한 인덱스부터 시작하여 WizardStepCollection 개체의 모든 항목을 WizardStepBase 개체의 호환되는 1차원 배열에 복사합니다.

Equals(Object)

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

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

컬렉션에서 IEnumerator 파생 개체를 반복하는 데 사용할 수 있는 WizardStepBase 구현 개체를 반환합니다.

GetHashCode()

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

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

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

(다음에서 상속됨 Object)
IndexOf(WizardStepBase)

컬렉션에 있는 지정된 WizardStepBase 파생 개체의 위치를 나타내는 인덱스 값을 확인합니다.

Insert(Int32, WizardStepBase)

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

MemberwiseClone()

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

(다음에서 상속됨 Object)
Remove(WizardStepBase)

컬렉션에서 지정된 WizardStepBase 파생 개체를 제거합니다.

RemoveAt(Int32)

컬렉션의 지정된 위치에서 WizardStepBase 파생 개체를 제거합니다.

ToString()

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

(다음에서 상속됨 Object)

명시적 인터페이스 구현

ICollection.CopyTo(Array, Int32)

대상 배열의 지정한 인덱스부터 시작하여 WizardStepCollection 컬렉션의 모든 항목을 1차원 배열에 복사합니다.

IList.Add(Object)

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

IList.Contains(Object)

지정한 개체가 컬렉션에 포함되는지 여부를 결정합니다.

IList.IndexOf(Object)

컬렉션에 있는 지정된 개체의 위치를 나타내는 인덱스 값을 확인합니다.

IList.Insert(Int32, Object)

지정된 개체를 컬렉션의 지정된 위치에 삽입합니다.

IList.IsFixedSize

컬렉션의 크기가 고정되어 있는지를 나타내는 값을 가져옵니다.

IList.Item[Int32]

컬렉션의 지정된 인덱스에 있는 개체를 가져옵니다.

IList.Remove(Object)

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

확장 메서드

Cast<TResult>(IEnumerable)

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

OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable)

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

AsQueryable(IEnumerable)

IEnumerableIQueryable로 변환합니다.

적용 대상

추가 정보