• 深入学习Windows Phone7(二. Music + Videos hub)


    Music + Videos hub可以将MusicVideo为主的程序集成到historynewmarquee中,当点击这些集成的图标,就可以打开相应的程序。据说YouTube就会以这样的形式出现在Phone7中。

    放到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);

     

    放到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);

     

    所集成的程序会自动放到Marquee列表下。

     

     

    Tile图的要求:

    但是目前在模拟器上好像这个要求是不对的,因为ImageStream只允许ImageSize16384,也就是16K左右,但是这个要求里最小的173*173pixels也比这个值大。不知道是不是因为是模拟器的缘故??

    另外,在WMAppManifest.xml中加入属性:HubType="1",可以用于测试。

     

  • 相关阅读:
    D. Constructing the Array
    B. Navigation System
    B. Dreamoon Likes Sequences
    A. Linova and Kingdom
    G. Special Permutation
    B. Xenia and Colorful Gems
    Firetrucks Are Red
    java getInstance()的使用
    java 静态代理和动态代理
    java 类加载机制和反射机制
  • 原文地址:https://www.cnblogs.com/randylee/p/1818827.html
Copyright © 2020-2023  润新知