sharee.bike-App/LastenradBayern/TINK/View/Info/InfoTabbedPage.xaml.cs
Anja Müller-Meißner 0468955d49 Version 3.0.338
2022-09-08 09:55:14 +02:00

41 lines
No EOL
1.1 KiB
C#

using System.Globalization;
using TINK.ViewModel;
using TINK.ViewModel.Info;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TINK.View.Info
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class InfoPage : TabbedPage
{
public InfoPageViewModel ViewModel { get; }
public InfoPage()
{
InitializeComponent();
ViewModel = new InfoPageViewModel(
App.ModelRoot.NextActiveUri.Host,
App.ModelRoot.ResourceUrls.AgbResourcePath,
App.ModelRoot.ResourceUrls.PrivacyResourcePath,
App.ModelRoot.ResourceUrls.ImpressResourcePath,
App.ModelRoot.IsSiteCachingOn,
CultureInfo.CurrentUICulture.TwoLetterISOLanguageName,
resourceName => ViewModelResourceHelper.GetSource(resourceName));
TabbedInfoPage.BindingContext = ViewModel;
InfoLicenses.Navigating += ViewModelHelper.OnNavigating;
InfoDatenschutz.Navigating += ViewModelHelper.OnNavigating;
InfoABG.Navigating += ViewModelHelper.OnNavigating;
InfoImpressum.Navigating += ViewModelHelper.OnNavigating;
}
/// <summary> Called when page is shown. </summary>
protected override void OnAppearing()
{
ViewModel.OnAppearing();
}
}
}