JOHN JOHNNNY

JOHN JOHNNNY

  • NA
  • 190
  • 140.8k

Pivot app template with multiple webbrowsers

Feb 22 2016 6:21 AM

Hi
I am using a pivot app template in my app with webbrowser control in each and
had 366 html files in my assets folder. Is it possible that whenever my users open
the app to be navigate to html page of that particular day instead of them
having to swipe to html page of the particular day which might be tiring/cumbersome
i.e if they open the app on 2/22/2016 the app should open 2_22_2016.html
See my code below

<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<!--Pivot Control-->
<phone:Pivot Title="MY APPLICATION">
<!--Pivot item one-->
<phone:PivotItem Header="item1">
<Grid>
<phone:WebBrowser Margin="0,2,6,-195" Name="webBrowser1" Height="Auto" Width="450" />
</Grid>
</phone:PivotItem>

<!--Pivot item two-->
<phone:PivotItem Header="item2">
<Grid>
<phone:WebBrowser Margin="0,2,6,-195" Name="webBrowser2" Height="Auto" Width="450" />
</Grid>
</phone:PivotItem>

<!--Pivot item three-->
<phone:PivotItem Header="item3">
<Grid>
<phone:WebBrowser Margin="0,2,6,-195" Name="webBrowser3" Height="Auto" Width="450" />
</Grid>
</phone:PivotItem>
</phone:Pivot>
</Grid>

xaml.cs

namespace HtmlWebViewLocally
{
public partial class PivotHtmlLocally : PhoneApplicationPage
{
public PivotHtmlLocally()
{
InitializeComponent();

SupportedOrientations = SupportedPageOrientation.Portrait | SupportedPageOrientation.Landscape;
//This will contain all the 366 html files of each day
webBrowser1.Navigate(new Uri("Bible1.html", UriKind.Relative));
webBrowser2.Navigate(new Uri("hymnpage1.html", UriKind.Relative));
webBrowser3.Navigate(new Uri("hymnpage2.html", UriKind.Relative));



}


}
}

Kindly help