小编tho*_*uka的帖子

如何在Windows 8中在线播放背景音乐

在我的应用程序中,我使用UI MediaElement.但是,当我单击Windows键时,音乐停止.

我试过用:

MediaControl.PlayPressed += MediaControl_PlayPressed;
        MediaControl.PausePressed += MediaControl_PausePressed;
        MediaControl.PlayPauseTogglePressed += MediaControl_PlayPauseTogglePressed;
        MediaControl.StopPressed += MediaControl_StopPressed;
Run Code Online (Sandbox Code Playgroud)

我设置了源MediaElement:

media.Source = new Uri("http://stream-hq.mp3.zdn.vn/fsgggsfdlwjglwjAAAAA/2a3f830202ea6d29bc7c5a5146401566/4ff5620a/2011/12/27/a/4/a4fcc199a184a93cfeb0fe35642c53bf.mp3", UriKind.RelativeOrAbsolute);
Run Code Online (Sandbox Code Playgroud)

请帮我!

c# windows-8

8
推荐指数
2
解决办法
4508
查看次数

该应用程序调用了一个为窗口8中的不同线程编组的接口

在项目中,我使用HttpWebRequest来下载Feeds:

HttpWebRequest request;
        public void getFeeds()
        {
            request = (HttpWebRequest)WebRequest.Create("http://vnexpress.net/rss/gl/trang-chu.rss");
            request.BeginGetResponse(ResponseCallBack, request);
        }
        SampleDataGroup group1;
        private void ResponseCallBack(IAsyncResult result)
        {
            var request = (HttpWebRequest)result.AsyncState;
            var response = request.EndGetResponse(result) as HttpWebResponse;


            if (response != null && response.StatusCode == HttpStatusCode.OK)
            {
                var stream = response.GetResponseStream();
                using (StreamReader reader = new StreamReader(stream))
                {
                    string strReaderReader = reader.ReadToEnd();

                    XDocument doc = XDocument.Parse(strReaderReader);
                    var element = doc.Root.Element("channel").Elements("item");
                    group1 = new SampleDataGroup("Group-1",
                    "Hot News",
                    "Group Subtitle: 1",
                    "Assets/DarkGray.png",
                    "");
                    foreach (XElement x in element)
                    {

                        group1.Items.Add(new …
Run Code Online (Sandbox Code Playgroud)

c# windows windows-8

4
推荐指数
1
解决办法
1万
查看次数

在窗口电话7中更新sql Ce

在项目i用户SQL CE中,我有表:

[Table]
public class Article : INotifyPropertyChanged, INotifyPropertyChanging
{

    // Define _cid: private field, public property, and database column.
    private int _aid;

    [Column(DbType = "INT NOT NULL IDENTITY", IsDbGenerated = true, IsPrimaryKey = true)]
    public int aid
    {
        get { return _aid; }
        set
        {
            NotifyPropertyChanging("aid");
            _aid = value;
            NotifyPropertyChanged("aid");
        }
    }

    // Define nameColor name: private field, public property, and database column.
    private int _rid;

    [Column]
    public int rid
    {
        get { return _rid; }
        set
        {
            NotifyPropertyChanging("rid"); …
Run Code Online (Sandbox Code Playgroud)

c# windows-phone-7

3
推荐指数
1
解决办法
1125
查看次数

清除窗口电话中的缓存7

我想在窗口手机7中使用Dipose缓存.在我的项目中,我有下载图像,使用后我通过以下方式处理图像:

Image.source = null;
Image = null;
Run Code Online (Sandbox Code Playgroud)

但内存不会恢复原状,例如:

下载后我设置了图像源:

img.source = new bitmapImage(new uri("http://diadiem.com/image/123.jpg"),UriKind.Relative);
Run Code Online (Sandbox Code Playgroud)

当下一页或LoadPage再次:我想要清除项目旧项目,并在缓存中补充内存.虽然我尝试了设置image.source= null,并设置控制Image = null.但记忆不会恢复原状.

请帮我!

windows-phone-7

2
推荐指数
1
解决办法
3116
查看次数

标签 统计

c# ×3

windows-8 ×2

windows-phone-7 ×2

windows ×1