Merge pull request 'pageRegles' (#80) from pageRegles into dev
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details

Reviewed-on: #80
Reviewed-by: Rémi LAVERGNE <remi.lavergne@etu.uca.fr>
pull/95/head
Rémi LAVERGNE 11 months ago
commit 9fae1d2702

@ -75,7 +75,7 @@
<HorizontalStackLayout Grid.Row="2" HorizontalOptions="Center" Spacing="50">
<Button Text="Retour" WidthRequest="300" HeightRequest="60" CornerRadius="4"/>
<Button Text="Acheter" WidthRequest="300" HeightRequest="60" CornerRadius="4"/>
<Button Text="Acheter" WidthRequest="300" HeightRequest="60" CornerRadius="4" Clicked="BrowserOpen_Clicked"/>
</HorizontalStackLayout>
</Grid>

@ -1,3 +1,5 @@
using System.ComponentModel;
namespace Trek_12.Views;
public partial class PageRegles : ContentPage
@ -6,4 +8,19 @@ public partial class PageRegles : ContentPage
{
InitializeComponent();
}
}
private async void BrowserOpen_Clicked(System.Object sender, System.EventArgs e)
{
try
{
Uri uri = new Uri("https://www.philibertnet.com/fr/lumberjacks-studio/89702-trek-12-3760268310293.html");
await Browser.Default.OpenAsync(uri, BrowserLaunchMode.SystemPreferred);
}
catch (Exception)
{
// An unexpected error occurred. No browser may be installed on the device.
throw new NotImplementedException();
}
}
}

Loading…
Cancel
Save