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

39 lines
1.3 KiB
C#
Raw Normal View History

2021-11-07 19:42:59 +01:00
using TINK.ViewModel;
using TINK.ViewModel.Info;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TINK.View.Info
{
[XamlCompilation(XamlCompilationOptions.Compile)]
2022-01-22 18:28:01 +01:00
public partial class InfoPage : TabbedPage
2021-11-07 19:42:59 +01:00
{
2022-01-22 18:28:01 +01:00
public InfoPageViewModel ViewModel { get; }
2021-11-07 19:42:59 +01:00
2022-01-22 18:28:01 +01:00
public InfoPage()
2021-11-07 19:42:59 +01:00
{
InitializeComponent();
2022-01-22 18:28:01 +01:00
ViewModel = new InfoPageViewModel(
2021-11-07 19:42:59 +01:00
App.ModelRoot.NextActiveUri.Host,
2022-01-22 18:28:01 +01:00
App.ModelRoot.ResourceUrls.AgbResourcePath,
App.ModelRoot.ResourceUrls.PrivacyResourcePath,
App.ModelRoot.ResourceUrls.ImpressResourcePath,
2021-11-07 19:42:59 +01:00
App.ModelRoot.IsSiteCachingOn,
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();
}
}
}