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.