Files
GreadyPoang/GreadyPoang/Views/RoundStartingView.xaml.cs

43 lines
1.0 KiB
C#

using GreadyPoang.ViewModelLayer;
namespace GreadyPoang.Views;
public partial class RoundStartingView : ContentPage
{
public RoundStartingView(RoundStartingViewModel viewModel)
{
InitializeComponent();
ViewModel = viewModel;
}
public RoundStartingViewModel ViewModel { get; set; }
public int GameRoundId { get; set; }
protected override void OnAppearing()
{
base.OnAppearing();
BindingContext = ViewModel;
ViewModel.Get();
ViewModel.GetParticipants();
}
protected override void OnSizeAllocated(double width, double height)
{
base.OnSizeAllocated(width, height);
if (width < 500)
{
VisualStateManager.GoToState(ResponsiveStack, "Narrow");
System.Diagnostics.Debug.WriteLine($"width={width} ResponsiveStack=Narrow ");
}
else
{
VisualStateManager.GoToState(ResponsiveStack, "Wide");
System.Diagnostics.Debug.WriteLine($"width={width} ResponsiveStack=Wide ");
}
}
}