windows-phone-7

WriteableBitmap exception when having multiple threads

落爺英雄遲暮 提交于 2019-12-25 17:39:34
问题 I create about 10 threads doing the same work - downloading image from the Internet. After the download is completed it will raise this callback function: private void DownloadImageWrapper(IRestResponse response, params object[] args) { byte[] imageData = response.RawBytes; using (Stream ms = new MemoryStream(imageData)) { WriteableBitmap wbImg = PictureDecoder.DecodeJpeg(ms); callback.DynamicInvoke(wbImg, file); }; } The exception is thrown in line with WriteableBitmap. I read that lock will

Windows Phone 7 - Make a call without user notification

天大地大妈咪最大 提交于 2019-12-25 17:04:40
问题 Is there any way from which i can call to any phone number from my contact list without showing user a notification? 回答1: No, that capability is not in the Windows Phone API. (And it's a good thing, IMO. Why would you legitimately need this ?). 回答2: Despite the popular misconception that this is completely impossible on Windows Phone, I must say that it is possible , but with a bit more work than you would expect. The key here are AT commands - the ATD command, to be specific (most Motorola

Simple use of WebClient on Windows Phone 7 throws a NetworkError

ぃ、小莉子 提交于 2019-12-25 16:41:38
问题 This code works in a WPF app but throws a NetworkException ("server not found") in WP7. Why the difference? WebClient client = new WebClient(); client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(Client_DownloadStringCompleted); Uri token = new Uri("http://www.bing.com"); client.DownloadStringAsync(token); Update: It looks like running Fiddler while debugging WP7 was the cause. Fiddler also breaks the browser on the emulator. Will post if I find a workaround for using

WP7 ListPicker Set SelectedItem Problem

夙愿已清 提交于 2019-12-25 14:13:46
问题 I have a list picker propagated by two strings from an XML file, one a name and one a value. XmlReader xml = XmlReader.Create("file.xml"); XDocument _doc = XDocument.Load(xml); var stringNames = from query in _doc.Descendants("string") select new CustomValue { StringName = (string)query.Attribute("name"), StringValue = (string)query.Attribute("value"), }; Listpicker.ItemsSource = stringNames; public class CustomValue { public string StringName { get; set; } public string StringValue { get;

how can I bind Bing Pushpins from multiple models?

穿精又带淫゛_ 提交于 2019-12-25 12:44:17
问题 I have the requirement in my WP7 application to display pushpins on a bing map from multiple data sources and I am not sure of the best way to do this. So for example it would be something like this, I receive from a web service a list of people, a list of buildings, a list of POIs etc. I would need to display these individually in their own views but also display them on a map with different images for each type. I am trying to use a MVVM approach so have a class for a Person, class for a

Expand application bar in Windows Phone 7 app from code

会有一股神秘感。 提交于 2019-12-25 12:13:41
问题 I need to know if there is a way to expand the application bar in Windows Phone app from code. Here is a demo of the application bar states: 回答1: Even though there is no API for 3rd party developers to do this, the application bar is a bit of an oddity on WP7. If you view a picture full size in the picture hub it will automatically expand the menu for you. Perhaps this is a UI mistake or perhaps we'll all gain access to this API in a future update. It's worth checking back on. 回答2: No, there

How to use XML as a database in windows phone 7 application?

≯℡__Kan透↙ 提交于 2019-12-25 09:47:10
问题 I am developing window phone 7 application. I am new to the window phone 7 application. I am using xml as a database for my current application. I am using the following link to use the XML as a database. http://rongchaua.net/blog/windows-phone-7-simple-database-example/ I have six tables (for e.g. table_A, table_B, table_C, table_D, table_E, table_F) for my current application. So should I create the six classes (for e.g. class_A, class_B, class_C, class_D, class_E, class_F) for my current

Existing silverlight app to WP7

前提是你 提交于 2019-12-25 09:27:36
问题 How to customize the existing silverlight appliction, to be able to run on windows phone 7? What are all the issues or API's or resolution problems will occur during the Migration? Thanks in Advance 回答1: This is a good place to start. Class Library Support for Windows Phone Differences Between Silverlight on Windows and Windows Phone Features Supported in Silverlight for Windows Phone Also, migrating your code across to the Windows Phone Application project template can be a less bumpy road

Streaming video & audio in Windows Phone 7

最后都变了- 提交于 2019-12-25 08:28:36
问题 I have an ASX stream that I would like to play on my Windows Phone 7. It appears that WP7 cannot handle client-side playlists, like an ASX file. So what do I do now? When I break into the ASX file, I see it's actually a mms:// stream with no file extension, so I can't even point to the raw file. How do I proceed from here? Is there a better option than the MediaElement control that will handle ASX files? More Info: My stream in question is audio/video, with WMA2/WVC1 encoding, respectively,

ListBox inside ListBox and selectedItem / Events

喜你入骨 提交于 2019-12-25 08:24:18
问题 I have now been stuck at this for some time so I though to ask the experts here. First the XAML: <ListBox Grid.Column="0" Tap="Some_Tap" SelectionChanged="Some_SelectionChanged"> <ListBox.ItemTemplate> <DataTemplate> <!-- the panel which covers a complete list item --> <StackPanel Orientation="Vertical"> <!-- start and end time for the travel route--> <Grid HorizontalAlignment="Center"> <Grid.ColumnDefinitions> <ColumnDefinition Width="100"/> <ColumnDefinition Width="100"/> <ColumnDefinition