Summary of Windows Phone 7 issues

Source: Internet
Author: User

1, why TextBlock when the data binding, set its allowdrop= "True" property will occur exception?

2, the data binding for the ListBox, the mobile phone direction for vertical when the content can be fully displayed, but when the phone landscape display when the content is not fully displayed?
The workaround is to delete the Height property of the listbox.


3. The Medialibrary class can get pictures and music from the Media Library.
medialibrary Library = new Medialibrary ();

4. Questions about Mediaplayer.play (); Methods:
Public partial class Examplepanoramapage1:phoneapplicationpage
{
static Medialibrary lib = new Medialibrary ();
Songcollection sc = lib. Songs;
Public ExamplePanoramaPage1 ()
{
InitializeComponent ();
}
private void Layoutroot_loaded (object sender, RoutedEventArgs e)
{
observablecollection<musicmodel> lst = new observablecollection<musicmodel> ();
for (int i = 0; I < SC. Count; i++)
{
lst. ADD (New Musicmodel ()
{
musicname = Sc[i]. Name,
auther = Sc[i]. Artist.name,
Musicpath = Sc[i]. Tracknumber
});
}
this.lstLirics.ItemsSource = LST;
}
private void Lstlirics_selectionchanged (object sender, SelectionChangedEventArgs e)
{
mediaplayer.pause ();
frameworkdispatcher.update ();//Why do I get an error when I call this method?
Mediaplayer.play (SC, lstlirics.selectedindex);
}
}

5, SoundEffect class play sound:
String path = "Sound/knock.wav";//production operation is "content"
var soundstream= application.getresourcestream (New Uri (Path, urikind.relativeorabsolute));
SoundEffect se = Soundeffect.fromstream (soundstream.stream);
Frameworkdispatcher.update ();//Why do you want to add this sentence? Don't understand.
Se. Play ();

6, hide the top system tray, you must use this. SetValue () method setting, cannot directly assign a value to his isvisibleproperty
This. SetValue (Microsoft.Phone.Shell.SystemTray.IsVisibleProperty, false);//! (bool) this. GetValue (Microsoft.Phone.Shell.SystemTray.IsVisibleProperty)

Summary of Windows Phone 7 issues

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.