Calendar.CaptionAlign 속성

정의

달력의 캡션으로 렌더링되는 텍스트의 맞춤 방식을 가져오거나 설정합니다.

public:
 virtual property System::Web::UI::WebControls::TableCaptionAlign CaptionAlign { System::Web::UI::WebControls::TableCaptionAlign get(); void set(System::Web::UI::WebControls::TableCaptionAlign value); };
public virtual System.Web.UI.WebControls.TableCaptionAlign CaptionAlign { get; set; }
member this.CaptionAlign : System.Web.UI.WebControls.TableCaptionAlign with get, set
Public Overridable Property CaptionAlign As TableCaptionAlign

속성 값

TableCaptionAlign

캡션의 맞춤 방식을 나타내는 TableCaptionAlign 값입니다.

예외

지정된 값이 TableCaptionAlign 값 중 하나가 아닌 경우

예제

다음 코드 예제에서는 컨트롤에 대 한 캡션을 CaptionAlign 정렬 하는 속성을 사용 하는 방법을 보여 줍니다 Calendar .

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

<!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> Calendar Caption and Caption Align Example </title>
</head>
<body>

   <form id="form1" runat="server">
  
      <h3> Calendar Caption and Caption Align Example </h3>

      <br /><br /> 
  
      <asp:Calendar id="Calendar1"
           ShowGridLines="True" 
           ShowTitle="True"
            Caption="This calendar is used to demonstrate a calendar caption. It also shows
            how the caption can be aligned to the calendar, in this case to the right edge of
            the calendar."
            CaptionAlign="right"  
           runat="server"/>

      <br /><br />

   </form>

</body>
</html>
<%@ Page Language="VB" AutoEventWireup="True" %>

<!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> Calendar Caption and Caption Align Example </title>
</head>
<body>

   <form id="form1" runat="server">
  
      <h3> Calendar Caption and Caption Align Example </h3>

      <br /><br /> 
  
      <asp:Calendar id="Calendar1"
           ShowGridLines="True" 
           ShowTitle="True"
            Caption="This calendar is used to demonstrate a calendar caption. It also shows
            how the caption can be aligned to the calendar, in this case to the right edge of
            the calendar."
            CaptionAlign="right"  
           runat="server"/>

      <br /><br />

   </form>

</body>
</html>

설명

이 속성은 컨트롤과 관련하여 Calendar 캡션이 표시되는 위치를 결정합니다. 기본값은 브라우저에서 캡션을 맞출 위치를 결정할 수 있도록 하는 값입니다 NotSet. 다음 표에서는 값과 캡션 모양 간의 TableCaptionAlign 관계를 설명합니다.

TableCaptionAlign 모양
Bottom 캡션은 달력의 아래쪽에 표시되고 텍스트는 가운데에 표시됩니다.
Left 캡션은 왼쪽 맞춤 텍스트와 함께 달력의 맨 위에 나타납니다.
NotSet 캡션 맞춤이 설정되지 않고 브라우저에 의해 결정됩니다.
Right 캡션은 달력의 맨 위에 표시되고 텍스트는 오른쪽 맞춤으로 표시됩니다.
Top 캡션은 텍스트가 가운데에 있는 달력의 맨 위에 나타납니다.

적용 대상

추가 정보