public ShareBarControl()
        {
            InitializeComponent();

            _viewModel = new ShareViewModel();
            rootGrid.DataContext = _viewModel;
        }
        private void InitializeCommands()
        {
            PlayAudioCommand = new RelayCommand<Audio>(audio =>
            {
                AudioService.Play(audio);
                AudioService.SetCurrentPlaylist(AllTracks);
            });

            ShowAllTracksCommand = new RelayCommand(() =>
            {
                MessengerInstance.Send(new NavigateToPageMessage()
                {
                    Page = "/Search.ArtistAudioView",
                    Parameters = new Dictionary<string, object>()
                    {
                        {"viewModel", this}
                    }
                });
            });

            ShowAllAlbumsCommand = new RelayCommand(() =>
            {
                MessengerInstance.Send(new NavigateToPageMessage()
                {
                    Page = "/Search.ArtistAlbumsView",
                    Parameters = new Dictionary<string, object>()
                    {
                        {"viewModel", this}
                    }
                });
            });


            GoToAlbumCommand = new RelayCommand<LastFmAlbum>(album =>
            {
                MessengerInstance.Send(new NavigateToPageMessage()
                {
                    Page = "/Search.AlbumView",
                    Parameters = new Dictionary<string, object>()
                    {
                        {"album", album}
                    }
                });
            });

            GoToArtistCommand = new RelayCommand<LastFmArtist>(artist =>
            {
                MessengerInstance.Send(new NavigateToPageMessage()
                {
                    Page = "/Search.ArtistView",
                    Parameters = new Dictionary<string, object>()
                    {
                        {"artist", artist}
                    }
                });
            });

            ShareCommand = new RelayCommand(() =>
            {
                var shareViewModel = new ShareViewModel();
                if (Tracks != null && Tracks.Count > 0)
                {
                    foreach (var track in AllTracks.Take(15))
                    {
                        shareViewModel.Tracks.Add(track);
                    }
                }

                if (File.Exists(App.Root + "/Cache/artists/" + Artist.Name + ".jpg"))
                {
                    shareViewModel.ImagePath = App.Root + "/Cache/artists/" + Artist.Name + ".jpg";
                    shareViewModel.Image = new BitmapImage(new Uri(shareViewModel.ImagePath));
                }

                var flyout = new FlyoutControl();
                flyout.FlyoutContent = new ShareView() { DataContext = shareViewModel };
                flyout.Show();

                shareViewModel.Activate();
            });
        }
        private void InitializeCommands()
        {
            PlayAudioCommand = new RelayCommand<Audio>(audio =>
            {
                AudioService.Play(audio);
                AudioService.SetCurrentPlaylist(Tracks);
            });

            SaveCommand = new RelayCommand(Save);

            ShareCommand = new RelayCommand(() =>
            {
                var shareViewModel = new ShareViewModel();
                if (Tracks != null && Tracks.Count > 0)
                {
                    foreach (var track in Tracks.Take(15))
                    {
                        shareViewModel.Tracks.Add(track);

                    }
                }

                if (File.Exists(App.Root + "/Cache/artists/" + Album.Artist + ".jpg"))
                {
                    shareViewModel.ImagePath = App.Root + "/Cache/artists/" + Album.Artist + ".jpg";
                    shareViewModel.Image = new BitmapImage(new Uri(shareViewModel.ImagePath));
                }

                var flyout = new FlyoutControl();
                flyout.FlyoutContent = new ShareView() { DataContext = shareViewModel };
                flyout.Show();

                shareViewModel.Activate();
            });
        }