WebPartDescription 클래스

정의

컨트롤의 인스턴스를 만들지 않고도 웹 파트 컨트롤의 카탈로그에 표시할 수 있는 WebPart 컨트롤에 대한 정보를 제공합니다.

public ref class WebPartDescription
public class WebPartDescription
type WebPartDescription = class
Public Class WebPartDescription
상속
WebPartDescription

예제

다음 코드 예제에서는 프로그래밍 방식으로 사용 하는 클래스입니다 WebPartDescription . 일반적으로 이 형식은 주로 웹 파트 컨트롤 집합에서 사용되지만, 이 코드 예제에서는 기본 설명 속성의 기본 프로그래밍 방식 사용을 간단히 보여 줍니다.

코드 예제에는 네 부분으로 구성됩니다.

  • 사용자가 웹 페이지의 표시 모드를 변경할 수 있는 사용자 컨트롤입니다.

  • 사용자 지정 WebPart 컨트롤입니다.

  • 다른 컨트롤을 호스트할 웹 페이지입니다.

  • 코드 예제의 작동 방식에 대한 설명입니다.

코드 예제의 첫 번째 부분은 사용자 정의 컨트롤입니다. 사용자 정의 컨트롤에 대 한 소스 코드는 다른 항목에서 제공 됩니다. 사용자 컨트롤에 대한 자세한 내용은 연습 : 웹 파트 페이지에서 표시 모드 변경 항목을 참조하세요.

<%@ control language="C#" classname="DisplayModeMenuCS"%>
<script runat="server">
  
 // Use a field to reference the current WebPartManager.
  WebPartManager _manager;

  void Page_Init(object sender, EventArgs e)
  {
    Page.InitComplete += new EventHandler(InitComplete);
    
  }  

  void InitComplete(object sender, System.EventArgs e)
  {
    _manager = WebPartManager.GetCurrentWebPartManager(Page);

    String browseModeName = WebPartManager.BrowseDisplayMode.Name;

    // Fill the dropdown with the names of supported display modes.
    foreach (WebPartDisplayMode mode in _manager.SupportedDisplayModes)
    {
      String modeName = mode.Name;
      // Make sure a mode is enabled before adding it.
      if (mode.IsEnabled(_manager))
      {
        ListItem item = new ListItem(modeName, modeName);
        DisplayModeDropdown.Items.Add(item);
      }
    }

    // If shared scope is allowed for this user, display the scope-switching
    // UI and select the appropriate radio button for the current user scope.
    if (_manager.Personalization.CanEnterSharedScope)
    {
      Panel2.Visible = true;
      if (_manager.Personalization.Scope == PersonalizationScope.User)
        RadioButton1.Checked = true;
      else
        RadioButton2.Checked = true;
    }
    
  }
 
  // Change the page to the selected display mode.
  void DisplayModeDropdown_SelectedIndexChanged(object sender, EventArgs e)
  {
    String selectedMode = DisplayModeDropdown.SelectedValue;

    WebPartDisplayMode mode = _manager.SupportedDisplayModes[selectedMode];
    if (mode != null)
      _manager.DisplayMode = mode;
  }

  // Set the selected item equal to the current display mode.
  void Page_PreRender(object sender, EventArgs e)
  {
    ListItemCollection items = DisplayModeDropdown.Items;
    int selectedIndex = 
      items.IndexOf(items.FindByText(_manager.DisplayMode.Name));
    DisplayModeDropdown.SelectedIndex = selectedIndex;
  }

  // Reset all of a user's personalization data for the page.
  protected void LinkButton1_Click(object sender, EventArgs e)
  {
    _manager.Personalization.ResetPersonalizationState();
  }

  // If not in User personalization scope, toggle into it.
  protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
  {
    if (_manager.Personalization.Scope == PersonalizationScope.Shared)
      _manager.Personalization.ToggleScope();
  }

  // If not in Shared scope, and if user is allowed, toggle the scope.
  protected void RadioButton2_CheckedChanged(object sender, EventArgs e)
  {
    if (_manager.Personalization.CanEnterSharedScope && 
        _manager.Personalization.Scope == PersonalizationScope.User)
      _manager.Personalization.ToggleScope();
  }
</script>
<div>
  <asp:Panel ID="Panel1" runat="server" 
    Borderwidth="1" 
    Width="230" 
    BackColor="lightgray"
    Font-Names="Verdana, Arial, Sans Serif" >
    <asp:Label ID="Label1" runat="server" 
      Text="&nbsp;Display Mode" 
      Font-Bold="true"
      Font-Size="8"
      Width="120" 
      AssociatedControlID="DisplayModeDropdown"/>
    <div>
    <asp:DropDownList ID="DisplayModeDropdown" runat="server"  
      AutoPostBack="true" 
      Width="120"
      OnSelectedIndexChanged="DisplayModeDropdown_SelectedIndexChanged" />
    <asp:LinkButton ID="LinkButton1" runat="server"
      Text="Reset User State" 
      ToolTip="Reset the current user's personalization data for the page."
      Font-Size="8"  
      OnClick="LinkButton1_Click" />
    </div>
    <asp:Panel ID="Panel2" runat="server" 
      GroupingText="Personalization Scope"
      Font-Bold="true"
      Font-Size="8" 
      Visible="false" >
      <asp:RadioButton ID="RadioButton1" runat="server" 
        Text="User" 
        AutoPostBack="true"
        GroupName="Scope" OnCheckedChanged="RadioButton1_CheckedChanged" />
      <asp:RadioButton ID="RadioButton2" runat="server" 
        Text="Shared" 
        AutoPostBack="true"
        GroupName="Scope" 
        OnCheckedChanged="RadioButton2_CheckedChanged" />
    </asp:Panel>
  </asp:Panel>
</div>
<%@ control language="vb" classname="DisplayModeMenuVB"%>
<script runat="server">
  ' Use a field to reference the current WebPartManager.
  Dim _manager As WebPartManager

  Sub Page_Init(ByVal sender As Object, ByVal e As EventArgs)
    AddHandler Page.InitComplete, AddressOf InitComplete
  End Sub

  Sub InitComplete(ByVal sender As Object, ByVal e As System.EventArgs)
    _manager = WebPartManager.GetCurrentWebPartManager(Page)
      
    Dim browseModeName As String = WebPartManager.BrowseDisplayMode.Name
      
    ' Fill the dropdown with the names of supported display modes.
    Dim mode As WebPartDisplayMode
    For Each mode In _manager.SupportedDisplayModes
      Dim modeName As String = mode.Name
      ' Make sure a mode is enabled before adding it.
      If mode.IsEnabled(_manager) Then
        Dim item As New ListItem(modeName, modeName)
        DisplayModeDropdown.Items.Add(item)
      End If
    Next mode
      
    ' If shared scope is allowed for this user, display the scope-switching
    ' UI and select the appropriate radio button for the current user scope.
    If _manager.Personalization.CanEnterSharedScope Then
      Panel2.Visible = True
      If _manager.Personalization.Scope = PersonalizationScope.User Then
        RadioButton1.Checked = True
      Else
        RadioButton2.Checked = True
      End If
    End If
   
  End Sub

  ' Change the page to the selected display mode.
  Sub DisplayModeDropdown_SelectedIndexChanged(ByVal sender As Object, _
    ByVal e As EventArgs)
    
    Dim selectedMode As String = DisplayModeDropdown.SelectedValue   
    Dim mode As WebPartDisplayMode = _
      _manager.SupportedDisplayModes(selectedMode)
    If Not (mode Is Nothing) Then
      _manager.DisplayMode = mode
    End If

  End Sub
   
  ' Set the selected item equal to the current display mode.
  Sub Page_PreRender(ByVal sender As Object, ByVal e As EventArgs)
    Dim items As ListItemCollection = DisplayModeDropdown.Items
    Dim selectedIndex As Integer = _
      items.IndexOf(items.FindByText(_manager.DisplayMode.Name))
    DisplayModeDropdown.SelectedIndex = selectedIndex

  End Sub

  ' Reset all of a user's personalization data for the page.
  Protected Sub LinkButton1_Click(ByVal sender As Object, _
    ByVal e As EventArgs)
    
    _manager.Personalization.ResetPersonalizationState()
    
  End Sub

  ' If not in User personalization scope, toggle into it.
  Protected Sub RadioButton1_CheckedChanged(ByVal sender As Object, _
    ByVal e As EventArgs)
    
    If _manager.Personalization.Scope = PersonalizationScope.Shared Then
      _manager.Personalization.ToggleScope()
    End If

  End Sub
   
  ' If not in Shared scope, and if user is allowed, toggle the scope.
  Protected Sub RadioButton2_CheckedChanged(ByVal sender As Object, _
    ByVal e As EventArgs)
    
    If _manager.Personalization.CanEnterSharedScope AndAlso _
      _manager.Personalization.Scope = PersonalizationScope.User Then
      _manager.Personalization.ToggleScope()
    End If

  End Sub

</script>
<div>
  <asp:Panel ID="Panel1" runat="server" 
    Borderwidth="1" 
    Width="230" 
    BackColor="lightgray"
    Font-Names="Verdana, Arial, Sans Serif" >
    <asp:Label ID="Label1" runat="server" 
      Text="&nbsp;Display Mode" 
      Font-Bold="true"
      Font-Size="8"
      Width="120" 
      AssociatedControlID="DisplayModeDropdown"/>
    <div>
    <asp:DropDownList ID="DisplayModeDropdown" runat="server"  
      AutoPostBack="true" 
      Width="120"
      OnSelectedIndexChanged="DisplayModeDropdown_SelectedIndexChanged" />
    <asp:LinkButton ID="LinkButton1" runat="server"
      Text="Reset User State" 
      ToolTip="Reset the current user's personalization data for the page."
      Font-Size="8" 
      OnClick="LinkButton1_Click" />
    </div>
    <asp:Panel ID="Panel2" runat="server" 
      GroupingText="Personalization Scope"
      Font-Bold="true"
      Font-Size="8" 
      Visible="false" >
      <asp:RadioButton ID="RadioButton1" runat="server" 
        Text="User" 
        AutoPostBack="true"
        GroupName="Scope" OnCheckedChanged="RadioButton1_CheckedChanged" />
      <asp:RadioButton ID="RadioButton2" runat="server" 
        Text="Shared" 
        AutoPostBack="true"
        GroupName="Scope" 
        OnCheckedChanged="RadioButton2_CheckedChanged" />
    </asp:Panel>
  </asp:Panel>
</div>

코드 예제의 두 번째 부분은 사용자 지정 WebPart 컨트롤입니다. 코드 예제를 실행하려면 이 소스 코드를 컴파일해야 합니다. 명시적으로 컴파일하고 결과 어셈블리를 웹 사이트의 Bin 폴더 또는 전역 어셈블리 캐시에 넣을 수 있습니다. 또는 런타임에 동적으로 컴파일되는 사이트의 App_Code 폴더에 소스 코드를 배치할 수 있습니다. 이 코드 예제에서는 동적 컴파일 방법을 사용합니다. 컴파일 방법을 보여 주는 연습은 연습: 사용자 지정 웹 서버 컨트롤 개발 및 사용을 참조하세요.

using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Security.Permissions;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace Samples.AspNet.CS.Controls
{
  [AspNetHostingPermission(SecurityAction.Demand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  [AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  public class TextDisplayWebPart : WebPart
  {
    private String _contentText = null;
    TextBox input;
    Label DisplayContent;
    Literal lineBreak;

    [Personalizable(), WebBrowsable]
    public String ContentText
    {
      get { return _contentText; }
      set { _contentText = value; }
    }

    protected override void CreateChildControls()
    {
      Controls.Clear();
      DisplayContent = new Label();
      DisplayContent.BackColor = Color.LightBlue;
      DisplayContent.Text = this.ContentText;
      this.Controls.Add(DisplayContent);

      lineBreak = new Literal();
      lineBreak.Text = @"<br />";
      Controls.Add(lineBreak);

      input = new TextBox();
      this.Controls.Add(input);
      Button update = new Button();
      update.Text = "Set Label Content";
      update.Click += new EventHandler(this.submit_Click);
      this.Controls.Add(update);
    }

    private void submit_Click(object sender, EventArgs e)
    {
      // Update the label string.
      if (!string.IsNullOrEmpty(input.Text))
      {
        _contentText = input.Text + @"<br />";
        input.Text = String.Empty;
        DisplayContent.Text = this.ContentText;
      }
    }
  }
}
Imports System.Collections
Imports System.ComponentModel
Imports System.Drawing
Imports System.Security.Permissions
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts

Namespace Samples.AspNet.VB.Controls

  <AspNetHostingPermission(SecurityAction.Demand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
  <AspNetHostingPermission(SecurityAction.InheritanceDemand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
  Public Class TextDisplayWebPart
    Inherits WebPart
    Private _contentText As String = Nothing
    Private _fontStyle As String = Nothing
    Private input As TextBox
    Private DisplayContent As Label
    Private lineBreak As Literal

    <Personalizable(), WebBrowsable()> _
    Public Property ContentText() As String
      Get
        Return _contentText
      End Get
      Set(ByVal value As String)
        _contentText = value
      End Set
    End Property

    Protected Overrides Sub CreateChildControls()
      Controls.Clear()
      DisplayContent = New Label()
      DisplayContent.BackColor = Color.LightBlue
      DisplayContent.Text = Me.ContentText
      Me.Controls.Add(DisplayContent)

      lineBreak = New Literal()
      lineBreak.Text = "<br />"
      Controls.Add(lineBreak)

      input = New TextBox()
      Me.Controls.Add(input)
      Dim update As New Button()
      update.Text = "Set Label Content"
      AddHandler update.Click, AddressOf Me.submit_Click
      Me.Controls.Add(update)

    End Sub

    Private Sub submit_Click(ByVal sender As Object, _
                             ByVal e As EventArgs)
      ' Update the label string.
      If input.Text <> String.Empty Then
        _contentText = input.Text + "<br />"
        input.Text = String.Empty
        DisplayContent.Text = Me.ContentText
      End If

    End Sub

  End Class

End Namespace

코드 예제의 세 번째 부분은 웹 페이지입니다. 맨 위에는 사용자 컨트롤을 등록하는 지시문과 사이트의 App_Code 폴더에 소스 파일이 있는 사용자 지정 WebPart 컨트롤을 등록하는 지시문이 있습니다Register. 페이지에 <asp:catalogzone> 는 요소, 즉 라는 사용자 지정 WebPart 컨트롤과 런타임 WebPartManager 에 컨트롤로 WebPart 처리되는 웹 서버 컨트롤 TextDisplayWebPartBulletedList 의 두 컨트롤에 대한 선언적 참조가 포함됩니다. 이 컨트롤은 개체로 GenericWebPart 래핑됩니다. 메서드의 코드 Button1_Click 에서 카탈로그의 컨트롤에 WebPart 사용할 수 WebPartDescription 있는 개체는 메서드를 사용하여 GetAvailableWebPartDescriptions 검색된 다음 설명 세부 정보가 모두 페이지에 기록됩니다.

<%@ Page Language="C#" %>
<%@ Register TagPrefix="uc1"
    TagName="DisplayModeMenuCS"
    Src="~/DisplayModeMenuCS.ascx" %>
<%@ Register TagPrefix="aspSample" 
    Namespace="Samples.AspNet.CS.Controls"%>

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

<script runat="server">

  // <snippet2>
  protected void Button1_Click(object sender, EventArgs e)
  {
    Label1.Text = String.Empty;
    
    WebPartDescriptionCollection descriptions = 
      DeclarativeCatalogPart1.GetAvailableWebPartDescriptions();

    foreach (WebPartDescription desc in descriptions)
    {
      Label1.Text += "ID: " + desc.ID + "<br />" +
        "Title: " + desc.Title + "<br />" +
        "Description: " + desc.Description + "<br />" +
        "ImageUrl: " + desc.CatalogIconImageUrl + "<br />" +
        "<hr />";
    }
  }
  // </snippet2>

  protected void Page_PreRender(object sender, EventArgs e)
  {
    if (mgr1.DisplayMode == WebPartManager.CatalogDisplayMode)
    {
      Button1.Visible = true;
      Label1.Visible = true;
    }
    else
    {
      Button1.Visible = false;
      Label1.Visible = false;
    }
  }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
  <title>Untitled Page</title>
</head>
<body>
  <form id="form1" runat="server">
    <asp:WebPartManager ID="mgr1" runat="server">
    </asp:WebPartManager>
    <uc1:DisplayModeMenuCS ID="menu1" runat="server" />
    <asp:WebPartZone ID="WebPartZone1" runat="server">
      <ZoneTemplate>
        <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
      </ZoneTemplate>
    </asp:WebPartZone>
    <asp:CatalogZone ID="CatalogZone1" runat="server">
      <ZoneTemplate>
        <asp:DeclarativeCatalogPart ID="DeclarativeCatalogPart1" runat="server">
          <WebPartsTemplate>
            <aspSample:TextDisplayWebPart ID="txtDisplayWebPart1" runat="server"
              Title="Text Display"
              Description="Displays entered text in a label control."
              CatalogIconImageUrl="MyWebPartIcon.gif" 
              />
            <asp:BulletedList 
              ID="BulletedList1"
              Runat="server"
              DisplayMode="HyperLink" 
              Title="Favorite Links"
              CatalogIconImageUrl="MyLinksIcon.gif"
              Description="My Favorite Links">
              <asp:ListItem Value="http://msdn.microsoft.com">
                MSDN
              </asp:ListItem>
              <asp:ListItem Value="http://www.asp.net">
                ASP.NET
              </asp:ListItem>
              <asp:ListItem Value="http://www.msn.com">
                MSN
              </asp:ListItem>
            </asp:BulletedList>
          </WebPartsTemplate>
        </asp:DeclarativeCatalogPart>
      </ZoneTemplate>
    </asp:CatalogZone> 
    <hr />
    <asp:Button ID="Button1" runat="server" 
      Text="List WebPartDescription Info" OnClick="Button1_Click" /> 
    <br />
    <asp:Label ID="Label1" runat="server" Text="" />
    <div>
    </div>
  </form>
</body>
</html>
<%@ Page Language="vb" %>
<%@ Register TagPrefix="uc1"
    TagName="DisplayModeMenuVB"
    Src="~/DisplayModeMenuVB.ascx" %>
<%@ Register TagPrefix="aspSample" 
    Namespace="Samples.AspNet.VB.Controls"%>

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

<script runat="server">

  ' <snippet2>
  Protected Sub Button1_Click(ByVal sender As Object, _
    ByVal e As System.EventArgs)
    
    Label1.Text = String.Empty
        
    Dim descriptions As WebPartDescriptionCollection = _
     DeclarativeCatalogPart1.GetAvailableWebPartDescriptions()
            
    Dim desc As WebPartDescription
        
    For Each desc In descriptions
      Label1.Text += "ID: " & desc.ID & "<br />" & _
        "Title: " & desc.Title & "<br />" & _
        "Description: " & desc.Description & "<br />" & _
        "ImageUrl: " & desc.CatalogIconImageUrl & "<br />" & _
        "<hr />"
    Next
    
  End Sub
  ' </snippet2>

  Protected Sub Page_PreRender(ByVal sender As Object, _
    ByVal e As System.EventArgs)
        
    If mgr1.DisplayMode Is WebPartManager.CatalogDisplayMode Then
      Button1.Visible = True
      Label1.Visible = True
    Else
      Button1.Visible = False
      Label1.Visible = False
    End If
        
  End Sub


</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
  <title>Untitled Page</title>
</head>
<body>
  <form id="form1" runat="server">
    <asp:WebPartManager ID="mgr1" runat="server">
    </asp:WebPartManager>
    <uc1:DisplayModeMenuVB ID="menu1" runat="server" />
    <asp:WebPartZone ID="WebPartZone1" runat="server">
      <ZoneTemplate>
        <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
      </ZoneTemplate>
    </asp:WebPartZone>
    <asp:CatalogZone ID="CatalogZone1" runat="server">
      <ZoneTemplate>
        <asp:DeclarativeCatalogPart ID="DeclarativeCatalogPart1" runat="server">
          <WebPartsTemplate>
            <aspSample:TextDisplayWebPart ID="txtDisplayWebPart1" runat="server"
              Title="Text Display"
              Description="Displays entered text in a label control."
              CatalogIconImageUrl="MyWebPartIcon.gif" 
              />
            <asp:BulletedList 
              ID="BulletedList1"
              Runat="server"
              DisplayMode="HyperLink" 
              Title="Favorite Links"
              CatalogIconImageUrl="MyLinksIcon.gif"
              Description="My Favorite Links">
              <asp:ListItem Value="http://msdn.microsoft.com">
                MSDN
              </asp:ListItem>
              <asp:ListItem Value="http://www.asp.net">
                ASP.NET
              </asp:ListItem>
              <asp:ListItem Value="http://www.msn.com">
                MSN
              </asp:ListItem>
            </asp:BulletedList>
          </WebPartsTemplate>
        </asp:DeclarativeCatalogPart>
      </ZoneTemplate>
    </asp:CatalogZone> 
    <hr />
    <asp:Button ID="Button1" runat="server" 
      Text="List WebPartDescription Info" OnClick="Button1_Click" /> 
    <br />
    <asp:Label ID="Label1" runat="server" Text="" />
    <div>
    </div>
  </form>
</body>
</html>

브라우저에서 페이지를 로드한 후 표시 모드 드롭다운 목록 컨트롤을 사용하고 카탈로그 를 선택하여 페이지를 카탈로그 표시 모드로 변경합니다. 카탈로그에는 페이지에 추가할 수 있는 두 개의 컨트롤이 표시됩니다. WebPartDescription 정보 나열 단추를 클릭하면 코드에서 사용 가능한 WebPartDescription 모든 개체의 값을 페이지에 기록합니다. 이는 컨트롤 자체의 인스턴스를 만들지 않고도 카탈로그의 컨트롤에 대한 WebPart 설명 세부 정보를 검색할 수 있음을 보여 줍니다.

설명

사용자가 페이지에 추가할 수 있는 컨트롤 카탈로그에 컨트롤이 표시되면 WebPart 각 컨트롤에 대한 몇 가지 기본 정보가 필요합니다. 예를 들어 사용자가 카탈로그를 볼 때 페이지에 컨트롤을 추가할지 여부를 결정하기에 충분한 정보를 갖도록 컨트롤의 제목과 설명을 갖는 것이 유용합니다. 그러나 카탈로그 WebPart 컨트롤은 다양 한 컨트롤을 포함 될 수 있습니다 및 경우에 이러한 애플리케이션의 성능을 영향을 줄 수 마다 WebPart 카탈로그에 표시할 정보를 추출 하려면 컨트롤을 만들어야 합니다.

클래스는 WebPartDescription 컨트롤의 카탈로그에 표시되는 컨트롤에 대한 정보를 검색하기 위해 컨트롤의 WebPart 인스턴스를 만들 필요가 없도록 존재합니다. 웹 파트 컨트롤 집합 WebPartDescription 에서 개체는 페이지가 카탈로그 표시 모드일 때 다양한 CatalogPart 컨트롤과 함께 사용됩니다.

클래스에는 WebPartDescription 해당 생성자의 두 오버로드가 있습니다. 하나는 인스턴스를 사용할 수 있을 때 컨트롤을 매개 변수(WebPartDescription생성자)로 사용하고WebPart, 하나는 컨트롤에 대한 정보가 있는 여러 문자열을 매개 변수(WebPartDescription생성자)로 사용합니다.

클래스에는 WebPartDescription 컨트롤에 대한 WebPart 설명 정보를 포함하도록 설계된 여러 속성도 있습니다. 다음 표에는 속성과 각 속성이 컨트롤에 해당하는 속성이 WebPart 요약 WebPartDescription 되어 있습니다.

Description 속성 관련 파트 제어 속성
ID ID
Title Title
Description Description
CatalogIconImageUrl CatalogIconImageUrl

생성자

WebPartDescription(String, String, String, String)

WebPart 컨트롤에 대한 설명 정보가 들어 있는 여러 문자열을 사용하여 클래스의 새 인스턴스를 초기화합니다.

WebPartDescription(WebPart)

WebPart 컨트롤 인스턴스를 사용할 수 있는 경우 클래스의 새 인스턴스를 초기화합니다.

속성

CatalogIconImageUrl

WebPart 컨트롤의 아이콘으로 사용되는 이미지의 경로가 들어 있는 URL을 가져옵니다.

Description

WebPart 컨트롤의 설명 텍스트를 가져옵니다.

ID

해당 WebPart 컨트롤의 ID를 가져옵니다.

Title

해당 WebPart 컨트롤의 제목 텍스트를 가져옵니다.

메서드

Equals(Object)

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

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

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

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

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

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

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

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

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

(다음에서 상속됨 Object)

적용 대상

추가 정보