コード例 #1
0
        private async void ExecuteShareCommand()
        {
            if (Cats == null)
            {
                return;
            }

            var cat = Cats.ElementAt(CardIndex);

            if (cat == null)
            {
                return;
            }

            if (CrossShare.IsSupported)
            {
                if (await CrossShare.Current.Share(new ShareMessage
                {
                    Title = "Miauuu!",
                    Url = cat.Url
                }))
                {
                    Debug.WriteLine($"{cat.Url} shared");
                }
                ;
            }
        }