A Web Clip is an icon on the iPhone’s Home screen that serves as a shortcut to a Web site – in other words, it’s an icon fashioned to mimic the launcher of a native iPhone application. You can specify a custom icon that will appear on users’ Home screens; to achieve this, simply set the C1ViewPort control’s or the C1LaunchPad control’s HomeScreenImageUrl property. The iPhone will automatically add visual effects to this icon so that it resembles a built-in icon.
Note: The image used must be 1) 57x57 pixels, 2) a PNG file, and 3) have 90-degree corners to take advantage of the iPhone’s visual enhancements.
In Design View
Complete the following steps:
1. Select the C1ViewPort or C1LaunchPad control.
2. In the Properties window, set the control’s HomeScreenImageUrl property to a URL string. For example, “Images/YourImage.png”.
In Source View
Add HomeScreenImageUrl=”YourImage.png”
to the
<cc1:C1ViewPort>
tag or the
<cc1:C1LaunchPad>
tag, replacing “Images/YourImage.png” with
the URL containing your graphic. The markup will resemble one of the
following:
<cc1:C1LaunchPad runat="server" ID="C1LaunchPad1" HomeScreenImageUrl=”Images/YourImage.png”>
<cc1:C1ViewPort runat="server" ID="C1ViewPort1" HomeScreenImageUrl=”Images/YourImage.png”>
In Code View
Complete the following:
1. In Design view, double click the page to enter Code view. This will also add a Page_Load event to your project.
2. Complete one of the following:
• For a C1LaunchPad control, add the following to the Page_Load event, replacing “Images/YourImage.png” with the URL to your image file:
C1LaunchPad1.HomeScreenImageUrl = “Images/YourImage.png”
o C#
C1LaunchPad1.HomeScreenImageUrl = “Images/YourImage.png”;
• For a C1ViewPort control, add the following to the Page_Load event, replacing “Images/YourImage.png” with the URL to your image file:
C1ViewPort1.HomeScreenImageUrl = “Images/YourImage.png”
o C#
C1ViewPort1.HomeScreenImageUrl = “Images/YourImage.png”;
3. Run the program.
This Topic
Illustrates the Following:
Now that you’ve set the HomeScreenImageUrl property, your custom Web Clip icon will appear on a user’s iPhone or iPad Home screen if they bookmark your Web site link.