В моем приложении winphone 7 есть веб-браузер для отображения нескольких веб-страниц, которые содержат 2 кнопки слева и справа с заголовком посередине, под ним вид сетки и несколько изображений под видом сетки.
Я пробовал почти каждую комбинацию из следующих:
<!--meta name="viewport" content="target-densitydpi=device-dpi; width=device-width; initial-scale=0.35; user-scalable=yes" /-->
<!--meta name="mobileoptimized" content="0" /-->
<!--meta name="viewport" content="width=480; initial-scale=5.0; user-scalable=yes;" id="ViewPort" runat="server" />
<!--meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=utf-8" /-->
<!--meta name="HandheldFriendly" content="true" /-->
<!--meta name="apple-mobile-web-app-capable" content="yes" /-->
Если я использую ширину устройства, последние несколько столбцов в моем сеточном представлении не отображаются на экране, попытка правильно масштабировать его с помощью начального масштаба ничего не дает.
Если я использую заданную ширину, например 320 или 640, вид сетки становится маленьким (меньше ширины экрана), и начальное масштабирование снова ничего не делает.
Есть идеи?
Источник aspx добавлен:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="iDetailled.aspx.cs" Inherits="iDetailled" Title="test" EnableEventValidation="false" %>
<%@ Register assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
<!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">
<!--meta name="viewport" content="target-densitydpi=device-dpi; width=device-width; initial-scale=0.35; user-scalable=yes" /-->
<!--meta name="mobileoptimized" content="0" /-->
<meta name="viewport" content="width=device-width, initial-scale=0.9,user-scalable=yes" id="ViewPort" runat="server" />
<!--meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=utf-8" /-->
<!--meta name="HandheldFriendly" content="true" /-->
<!--meta name="apple-mobile-web-app-capable" content="yes" /-->
<title></title>
<script type="text/javascript">
function CallMe() { javascript: history.go(-1); }
</script>
</head>
<link rel="stylesheet" type="text/css" href="stylesheet.css"
media="screen"/>
<body class="GradientBackground3" bgcolor="#CFD1D2">
<form id="form1" runat="server" >
<asp:ScriptManager ID="ScriptManager1" runat="server" EnableHistory="True"
onnavigate="ScriptManager1_Navigate">
</asp:ScriptManager>
<div align="center">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:MultiView ID="MultiView1" runat="server"
onactiveviewchanged="MultiView1_ActiveViewChanged" >
<asp:View ID="View1" runat="server">
<br />
<asp:Panel ID="Panel2" runat="server" Width="90%" >
<table align="center" width="100%">
<tr>
<td align="left" >
<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/Images/min2.png" Height="48px" onclick="ImageButton1_Click"
Width="48px" />
</td>
<td>
<table align="center" >
<tr align="center">
<td>
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="Large" Text="Turnover by day"></asp:Label>
</td>
</tr>
<tr align="center">
<td>
<asp:Label ID="Label4" runat="server" Text="Label"></asp:Label>
</td>
</tr>
</table>
</td>
<td align="right">
<asp:ImageButton ID="ImageButton2" runat="server" Height="48px"
ImageUrl="~/Images/plus2.png" onclick="ImageButton2_Click" Width="48px" />
</td>
</tr>
</table>
</asp:Panel>
<br />
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
CellPadding="4" DataSourceID="SqlDataSourceDag" ForeColor="#333333"
GridLines="Vertical" onrowcreated="GridView2_RowCreated"
onselectedindexchanged="GridView2_SelectedIndexChanged"
onrowdatabound="GridView2_RowDataBound"
EmptyDataText="No data to display" >
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="TYBusinessDate" DataFormatString="{0:dd/MM}"
HeaderText="This Year" ReadOnly="True"
SortExpression="TYBusinessDate">
<HeaderStyle VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
</asp:BoundField>
<asp:BoundField DataField="LYBusinessDate" DataFormatString="{0:dd/MM}"
HeaderText="Last Year" ReadOnly="True"
SortExpression="LYBusinessDate">
<HeaderStyle VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
</asp:BoundField>
<asp:BoundField DataField="Day" HeaderText="Day" ReadOnly="True"
SortExpression="Day">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="TYTurnoverAmt" DataFormatString="{0:F0}"
HeaderText="This Year" ReadOnly="True" SortExpression="TYTurnoverAmt">
<HeaderStyle HorizontalAlign="Right" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:BoundField DataField="LYTurnoverAmt" DataFormatString="{0:F0}"
HeaderText="Last Year" ReadOnly="True" SortExpression="LYTurnoverAmt">
<HeaderStyle HorizontalAlign="Right" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:TemplateField HeaderText="%">
<ItemTemplate>
<asp:Label ID="Label55" runat="server" Text="Label"></asp:Label>
</ItemTemplate>
<HeaderStyle VerticalAlign="Bottom" HorizontalAlign="Right" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<asp:BoundField DataField="TYClients" HeaderText="This Year" ReadOnly="True"
SortExpression="TYClients" >
<HeaderStyle HorizontalAlign="Right" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:BoundField DataField="LYClients" HeaderText="Last Year" ReadOnly="True"
SortExpression="LYClients" >
<HeaderStyle HorizontalAlign="Right" VerticalAlign="Bottom" BorderColor="White" BorderStyle="Solid"
BorderWidth="1px"/>
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="ImageButton5" runat="server" ImageUrl="~/Images/arrow.png"
onclick="ImageButton5_Click" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#999999" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>
<br />
<asp:Chart ID="Chart2" runat="server" DataSourceID="SqlDataSourceDag" BackColor="#CFD1D2" >
<Titles>
<asp:Title Name="Title1" Text="Turnover">
</asp:Title>
</Titles>
<series>
<asp:Series Name="ThisYear" XValueMember="Day" YValueMembers="TYTurnoverAmt" LegendText="Turnover this year">
</asp:Series>
<asp:Series Name="LastYear" XValueMember="Day" YValueMembers="LYTurnoverAmt" LegendText="Turnover last year">
</asp:Series>
</series>
<chartareas>
<asp:ChartArea Name="ChartArea1" Area3DStyle-Enable3D="true" Area3DStyle-IsClustered="true" BackColor="White" >
<AxisY IntervalAutoMode="VariableCount" IntervalType="Number" IntervalOffsetType="Number">
</AxisY>
<Area3DStyle Enable3D="True" IsClustered="True" />
</asp:ChartArea>
</chartareas>
<Legends>
<asp:Legend Docking="Bottom" Name="Legend1" BackColor="#CFD1D2" >
</asp:Legend>
</Legends>
</asp:Chart>
<asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSourceDag" BackColor="#CFD1D2">
<Titles>
<asp:Title Name="Title1" Text="Clients">
</asp:Title>
</Titles>
<series>
<asp:Series ChartType="Line" Legend="Legend1"
Name="ClientTY" XValueMember="Day" YValueMembers="TYClients" BorderWidth="3" LegendText="Clients this year">
</asp:Series>
<asp:Series ChartType="Line" Legend="Legend1"
Name="ClientLY" XValueMember="Day" YValueMembers="LYClients" BorderWidth="3" LegendText="Clients last year">
</asp:Series>
</series>
<chartareas>
<asp:ChartArea Name="ChartArea1" >
<AxisY IntervalAutoMode="VariableCount" IntervalType="Number" IntervalOffsetType="Number">
</AxisY>
<AxisX IsLabelAutoFit="False">
<LabelStyle Angle="-90" />
</AxisX>
</asp:ChartArea>
</chartareas>
<Legends>
<asp:Legend Docking="Bottom" Name="Legend1" BackColor="#CFD1D2">
</asp:Legend>
</Legends>
</asp:Chart>
<br />
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Back"
Visible="False" />
<br />
<asp:SqlDataSource ID="SqlDataSourceDag" runat="server"
ConnectionString="<%$ ConnectionStrings:OSCConnectionString %>"
SelectCommand="WWWiPhoneAllStoresPerDay" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
</asp:View>
....second view stripped
</asp:MultiView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>