sharee.bike-App/TINK/TINK/View/Info/InfoTabbedPage.xaml.cs

41 lines
1.1 KiB
C#
Raw Normal View History

2022-08-30 15:42:25 +02:00
using System.Globalization;
using TINK.ViewModel;
2021-05-13 20:16:41 +02:00
using TINK.ViewModel.Info;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TINK.View.Info
{
2022-09-06 16:08:19 +02:00
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class InfoPage : TabbedPage
{
public InfoPageViewModel ViewModel { get; }
2021-05-13 20:16:41 +02:00
2022-09-06 16:08:19 +02:00
public InfoPage()
{
InitializeComponent();
2021-05-13 20:16:41 +02:00
2022-09-06 16:08:19 +02:00
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;
2021-05-13 20:16:41 +02:00
2022-09-06 16:08:19 +02:00
InfoLicenses.Navigating += ViewModelHelper.OnNavigating;
InfoDatenschutz.Navigating += ViewModelHelper.OnNavigating;
InfoABG.Navigating += ViewModelHelper.OnNavigating;
2021-05-13 20:16:41 +02:00
2022-09-06 16:08:19 +02:00
InfoImpressum.Navigating += ViewModelHelper.OnNavigating;
}
2021-05-13 20:16:41 +02:00
2022-09-06 16:08:19 +02:00
/// <summary> Called when page is shown. </summary>
protected override void OnAppearing()
{
ViewModel.OnAppearing();
}
}
2021-05-13 20:16:41 +02:00
}