Learn more about Windows Phone7 (II. Music + Videos hub)

Source: Internet
Author: User

Music + Videos hub can integrate Music or Video-based programs into history, new, and marquee. When you click these integrated icons, you can open the corresponding programs. It is said that YouTube will appear in phone7.

Put it in History:

1. Now Playing:

MediaHistoryItem mhi = new MediaHistoryItem ();

Mhi. Source = "";

Mhi. ImageStream = App. GetResourceStream (new Uri ("Images/s.jpg", UriKind. Relative). Stream;

Mhi. Title = "Now Playing ";

Mhi. PlayerContext. Add ("test1", "test2 ");

MediaHistory. Instance. NowPlaying = mhi;

 

 

2. Recent Playing:

MediaHistoryItem mhi = new MediaHistoryItem ();

Mhi. Source = "";

Mhi. ImageStream = App. GetResourceStream (new Uri ("Images/s.jpg", UriKind. Relative). Stream;

Mhi. Title = "Recent Play ";

Mhi. PlayerContext. Add ("test1", "aa ");

MediaHistory. Instance. WriteRecentPlay (mhi );

 

 

Put it in new:

MediaHistoryItem mhi = new MediaHistoryItem ();

Mhi. Source = "";

Mhi. ImageStream = App. GetResourceStream (new Uri ("Images/s.jpg", UriKind. Relative). Stream;

Mhi. Title = "Recent Play ";

Mhi. PlayerContext. Add ("test1", "aa ");

MediaHistory. Instance. WriteAcquiredItem (mhi );

 

The Integrated Program is automatically placed under the Marquee list.

 

 

Requirements for the Tile graph:

 

However, at present, it seems that this requirement is incorrect on the simulator, because ImageStream only allows the ImageSize to be 16384, that is, around 16 K, but the minimum 173 * 173pixels in this requirement is also greater than this value. I don't know, is it because of a simulator ??

 

In addition, add the property HubType = "1" to WMAppManifest. xml for testing.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.