Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Silverlight Media Player

, 6 Apr 2009
Has some cool features like sliding menus with animation and Drag N Drop from menu
SilverLightMediaPlayer.zip
SilverLightMediaPlayer
MediaPlayer
Bin
Debug
de
System.Xml.Linq.resources.dll
es
System.Xml.Linq.resources.dll
fr
System.Xml.Linq.resources.dll
it
System.Xml.Linq.resources.dll
ja
System.Xml.Linq.resources.dll
ko
System.Xml.Linq.resources.dll
MediaPlayer.dll
MediaPlayer.xap
System.Xml.Linq.dll
zh-Hans
System.Xml.Linq.resources.dll
zh-Hant
System.Xml.Linq.resources.dll
MediaPlayer.csproj.user
Properties
v1.jpg
v2.jpg
MediaPlayerLive
App_Data
bin
de
System.Web.Silverlight.resources.dll
es
System.Web.Silverlight.resources.dll
fr
System.Web.Silverlight.resources.dll
it
System.Web.Silverlight.resources.dll
ja
System.Web.Silverlight.resources.dll
ko
System.Web.Silverlight.resources.dll
MediaPlayerLive.dll
MediaPlayerLive.pdb
System.Web.Silverlight.dll
zh-Hans
System.Web.Silverlight.resources.dll
zh-Hant
System.Web.Silverlight.resources.dll
ClientBin
MediaPlayer.xap
MediaPlayerLive.csproj.user
Properties
SilverLightMediaPlayer.suo
using System;
using System.Windows;
using System.Windows.Controls;
using System.Xml.Linq;
using System.Linq;
using System.Collections.Generic;
using System.Windows.Media.Imaging;

namespace MediaPlayer
{
    public class DataAcces
    {
        public static void SetRightVertPanel(StackPanel elem)
        {
            XDocument xDoc = XDocument.Load("Data.xml");
            var xVids = from v in xDoc.Descendants("Video")   
                        where v.Attribute("img").Value.Length>0 && v.Attribute("vid").Value.Length>0
                        select new
                        {
                            img = v.Attribute("img").Value,
                            vid = v.Attribute("vid").Value,
                            id = v.Attribute("id").Value
                        };
            elem.Children.Clear();           
            foreach (var v in xVids)
            {
                Image img = new Image();
                img.Source = new BitmapImage(new Uri(v.img, UriKind.Relative));                
                img.Margin = new Thickness(1, 4, 1, 0);
                img.Width = 50;
                elem.Children.Add(img);  
            }     
        }
        public static string GetVideoName(string imgPara)
        {
            XDocument xDoc = XDocument.Load("Data.xml");
            var xVids = from v in xDoc.Descendants("Video")
                        where v.Attribute("img").Value.Equals(imgPara) 
                        select new
                        {
                            img = v.Attribute("img").Value,
                            vid = v.Attribute("vid").Value,
                            id = v.Attribute("id").Value
                        };
            if (xVids.Count() > 0)
            {
                return xVids.First().vid;
            }
            else
                return "";
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under A Public Domain dedication

Share

About the Author

sunit_82
Software Developer (Senior) Geometric
India India
B.E. in Information Technology
MCTS(.NET 2.0 )

| Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 6 Apr 2009
Article Copyright 2009 by sunit_82
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid