1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-30 06:56:10 +00:00

Menu share

This commit is contained in:
Yan Maniez 2019-05-12 19:35:48 +02:00
parent f5bebf92c2
commit 2afdc1e6b6
2 changed files with 17 additions and 4 deletions

View file

@ -16,7 +16,7 @@
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<ImageButton Grid.Column="0" HeightRequest="32" Margin="5" Source="cancel.png" Command="{Binding CloseCommand, Source={x:Reference this}}"/>
<ImageButton Grid.Column="2" HeightRequest="32" Margin="5" Source="share.png" />
<ImageButton Grid.Column="2" HeightRequest="32" Margin="5" Source="share.png" Command="{Binding ShareCommand, Source={x:Reference this}}"/>
<ActivityIndicator
Grid.Row="1"
Grid.ColumnSpan="3"

View file

@ -25,13 +25,26 @@ namespace AideDeJeu.Views.PlayerCharacter
{
get
{
return new Command(ExecuteCloseCommand);
return new Command(async() => await ExecuteCloseCommandAsync());
}
}
private void ExecuteCloseCommand()
private async Task ExecuteCloseCommandAsync()
{
Navigation.PopModalAsync(true);
await Navigation.PopModalAsync(true);
}
public ICommand ShareCommand
{
get
{
return new Command(async() => await ExecuteShareCommandAsync());
}
}
private async Task ExecuteShareCommandAsync()
{
var result = await DisplayActionSheet("Actions", "Annuler", null, "Envoyer vers...", "Ouvrir avec...");
}
}
}