CircleHotSpot.Radius Özellik

Tanım

Merkezden bu CircleHotSpot nesne tarafından tanımlanan dairesel bölgenin kenarına olan uzaklığı alır veya ayarlar.

public:
 property int Radius { int get(); void set(int value); };
public int Radius { get; set; }
member this.Radius : int with get, set
Public Property Radius As Integer

Özellik Değeri

Int32

Piksel cinsinden merkezden bu CircleHotSpot nesne tarafından tanımlanan dairesel bölgenin kenarına olan uzaklığı temsil eden bir tamsayı. Varsayılan değer, 0'dur.

Özel durumlar

Belirtilen değer 0'dan küçük.

Örnekler

Aşağıdaki kod örneği, iki CircleHotSpot nesne içeren bir ImageMap denetimin nasıl oluşturulacağını gösterir. Biri bildirim temelli olarak oluşturulur; , XYve Radius özellikleri de bildirim temelli olarak ayarlanır. Diğeri program aracılığıyla oluşturulur ve onun X, Yve Radius özellikleri program aracılığıyla ayarlanır. Bu örneğin düzgün çalışması için özellik için kendi görüntünüzü sağlamanız ve uygulamanın onu bulabilmesi için ImageUrl görüntünün yolunu uygun şekilde güncelleştirmeniz gerekir.

<%@ 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>

Açıklamalar

özelliği, Radius piksel cinsinden merkezden bu CircleHotSpot nesne tarafından tanımlanan dairesel bölgenin kenarına olan uzaklığı temsil eden bir değer almanıza veya ayarlamanıza olanak tanır. Bir CircleHotSpot nesneyi tamamen tanımlamak için ve özelliklerinin yanı X Y sıra özelliği için Radius de bir değer belirtmeniz gerekir.

Şunlara uygulanır

Ayrıca bkz.