CircleHotSpot.Y 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
이 CircleHotSpot 개체에서 정의한 순환 영역의 중심 y 좌표를 가져오거나 설정합니다.
public:
property int Y { int get(); void set(int value); };
public int Y { get; set; }
member this.Y : int with get, set
Public Property Y As Integer
속성 값
이 CircleHotSpot 개체에서 정의한 원형 영역 가운데의 y 좌표입니다. 기본값은 0입니다.
예제
다음 코드 예제에서는 두 CircleHotSpot 개체를 포함 하는 컨트롤을 ImageMap 만드는 방법을 보여 줍니다. 하나는 선언적으로 만들어집니다. 해당 X, Y및 Radius 속성도 마찬가지로 선언적으로 설정됩니다. 다른 하나는 프로그래밍 방식으로 만들어지고 해당 X, YRadius 속성은 프로그래밍 방식으로 설정됩니다. 이 예제가 제대로 작동하려면 속성에 대한 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 a CircleHotSpot object.
CircleHotSpot Circle1 = new CircleHotSpot ();
// Set properties on the CircleHotSpot object.
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 the CirclHotSpot object to the
// Shop ImageMap control's HotSpotCollection.
Shop.HotSpots.Add (Circle1);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="head1" runat="server">
<title>CircleHotSpot Properties Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3>CircleHotSpot Example</h3>
<h4>Shopping Choices:</h4>
<asp:imagemap id="Shop"
imageurl="Images/ShopChoice.jpg"
alternatetext="Shopping choices"
runat="Server">
<asp:circlehotspot
navigateurl="http://www.cohowinery.com"
x="145"
y="290"
radius="75"
hotspotmode="Navigate"
alternatetext="Shop for wine">
</asp:circlehotspot>
</asp:imagemap>
</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 a CircleHotSpot object.
Dim Circle1 As New CircleHotSpot
' Set properties on the CircleHotSpot object.
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 the CirclHotSpot object to the
' Shop ImageMap control's HotSpotCollection.
Shop.HotSpots.Add(Circle1)
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="head1" runat="server">
<title>CircleHotSpot Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3>CircleHotSpot Properties Example</h3>
<h4>Shopping Choices:</h4>
<asp:imagemap id="Shop"
imageurl="Images/ShopChoice.jpg"
alternatetext="Shopping choices"
runat="Server">
<asp:circlehotspot
navigateurl="http://www.cohowinery.com"
x="145"
y="290"
radius="75"
hotspotmode="Navigate"
alternatetext="Shop for wine">
</asp:circlehotspot>
</asp:imagemap>
</form>
</body>
</html>
설명
이 속성을 사용하면 이 YCircleHotSpot 개체에서 정의한 원형 영역 가운데의 y 좌표를 나타내는 값을 얻거나 설정할 수 있습니다. 개체를 CircleHotSpot 완전히 정의하려면 속성 및 Radius 속성 X 에 Y 대한 값을 지정해야 합니다.