If your Web site mimics a native iPhone application by launching in full-screen mode, you may want to minimize the default status bar that displays at the top of the iPhone OS. You can achieve this by setting the C1ViewPort control’s or the C1LaunchPad control’s StatusBarStyle property to Black, which minimizes the status bar and changes its color to translucent black.
Note: This feature is only available when your Web site is launched in full-screen mode. For more information about launching the Web site in full-screen mode on an iPad or iPhone device, see Hiding Safari UI Elements.
In Design View
Complete the following steps:
1. Select the C1ViewPort or C1LaunchPad control.
2. In the Properties window, set the following properties:
• Set the StatusBarStyle property to Black.
• Set the FullScreenCapable property to True:
In Source View
Complete the following steps:
1.
Add StatusBarStyle=Black
to the <cc1:C1ViewPort>
tag or the <cc1:C1LaunchPad>
tag.
2.
Add FullScreenCapable=”True”
to the
<cc1:C1ViewPort>
tag or the
<cc1:C1LaunchPad>
tag.
The markup will resemble one of the following:
<cc1:C1LaunchPad runat="server" ID="C1LaunchPad1" StatusBarStyle=”Black” FullScreenCapable=”True”>
<cc1:C1ViewPort runat="server" ID="C1ViewPort1" StatusBarStyle=”Black” FullScreenCapable=”True”>
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 to set the StatusBarStyle and FullScreenCapable properties:
C1LaunchPad1.StatusBarStyle = C1.Web.iPhone.StatusBarStyle.Black
C1LaunchPad1.FullScreenCapable = True
o C#
C1LaunchPad1.StatusBarStyle = C1.Web.iPhone.StatusBarStyle.Black
C1LaunchPad1.FullScreenCapable = true;
• For a C1ViewPort control, add the following to the Page_Load event to set the StatusBarStyle and FullScreenCapable properties:
C1ViewPort1.StatusBarStyle = C1.Web.iPhone.StatusBarStyle.Black
C1ViewPort1.FullScreenCapable = True
o C#
C1ViewPort1.StatusBarStyle = C1.Web.iPhone.StatusBarStyle.Black
C1ViewPort1.FullScreenCapable = true;
3. Run the program.
This Topic
Illustrates the Following:
Now that you’ve set the StatusBarStyle property to Black of an image and the FullScreenCapable property to True, the iPhone OS’s status bar will be hidden when a customer loads your full-screen Web site from the iPhone or iPad’s Home screen.