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)
- {
- // SfBusyIndicator busyIndicator = new SfBusyIndicator();
- progress.IsVisible = true;
- // busyindicator.IsVisible = true;
- }
- protected void OnNavigated(object sender, WebNavigatedEventArgs e)
- {
- // SfBusyIndicator busyIndicator = new SfBusyIndicator();
- progress.IsVisible = false;
- // busyindicator.IsVisible = false;
- }
- }
- }


Guest UserRank #816 · 2.8K reputationPosted Nov 18, 2019, 3:52 AM EST
B OpritRank #3,359 · 428 reputationPosted Nov 18, 2019, 8:10 AM EST
Guest UserRank #816 · 2.8K reputationPosted Nov 19, 2019, 12:11 AM EST
B OpritRank #3,359 · 428 reputationPosted Nov 19, 2019, 8:47 AM EST
Guest UserRank #816 · 2.8K reputationPosted Nov 19, 2019, 9:13 PM EST