Hello ,
I am new at Xamarin Forms and this is what i am trying to do.
Based on the month i want to show a document from Google docs in a Webview
I know how to show the document but not the if statement.
Trying to put a label with the month showing in a stacklayout with the webview , so far so good.
The label is showing 11
But how do i make it work that when the month is changing it is going to another document.
This month is
Webview.Source = "https://docs.google.com/spreadsheets/d/1h2wQMlPpvnajq_Dg-Yx6Gwh4wzy7ZPd3Kp5gnDnEszY/edit?usp=sharing";
and this for December
https://docs.google.com/spreadsheets/d/1BEryoKhaTP6tx2VsYibYXE5kJoEBKqGFNrhov1W_b7s/edit?usp=sharing
The mainpage
Text="{Binding Source={x:Static sys:DateTime.Now}, StringFormat='{0:MM}'}" />
HorizontalOptions="FillAndExpand"
x:Name="progress"
ProgressColor="Maroon"
IsVisible="True"/>
HeightRequest="1000"
WidthRequest="1000"
Navigating="OnNavigating"
Navigated="OnNavigated"
VerticalOptions="FillAndExpand"/>
And the Main.xaml.cs
- public partial class MainPage : ContentPage
- {
- public MainPage()
- {
- InitializeComponent();
- Webview.Source = "https://docs.google.com/spreadsheets/d/1h2wQMlPpvnajq_Dg-Yx6Gwh4wzy7ZPd3Kp5gnDnEszY/edit?usp=sharing";
- }
- protected async override void OnAppearing()
- {
- base.OnAppearing();
- await progress.ProgressTo(0.9, 900, Easing.SpringIn);
- }
- protected void OnNavigating(object sender, WebNavigatingEventArgs e)
- {
-
- progress.IsVisible = true;
-
- }
- protected void OnNavigated(object sender, WebNavigatedEventArgs e)
- {
-
- progress.IsVisible = false;
-
- }
- }
- }