private void LoadUI(Code.Playlist.Playlist playlist)
        {
            this.StackMedia.Children.Clear();
            if (playlist != null)
            {
                this.UITitle.Text = playlist.Name;
                List<MediaEvent> Medias = playlist.LoadMediaEvent();
                if (Medias != null)
                {
                    foreach (MediaEvent e in Medias)
                    {
                        UIMediaEvent UIE = new UIMediaEvent();
                        UIE.Height = 50;
                        UIE.Width = 395;
                        UIE.Event = e;
                        UIE.DeleteEvent += UIE_DeleteEvent;
                        UIE.ViewMediaEvent += UIE_ViewMediaEvent;
                        this.StackMedia.Children.Add(UIE);

                    }
                }
            }
            else
            {
                this.UITitle.Text = string.Empty;
            }
            
        }