windows-phone-7.1

How to get contacts address from Contacts.SearchAsync results?

大兔子大兔子 提交于 2019-12-11 18:14:52
问题 I am binding a listbox with contacts address using following xaml code <ListBox Name="ContactResultsDataLINQ" ItemsSource="{Binding}" Height="200" Margin="24,0,0,0" DataContext="{Binding}"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Text="{Binding Path=Addresses[0].PhysicalAddress.AddressLine1, Mode=OneWay}" /> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> However, this only binds AddressLine1...what i want it complete address = AddressLine1 +

stop the stackpanel items inside scroll viewer to be at the display left side when scroll

天涯浪子 提交于 2019-12-11 18:09:25
问题 I have added 10 images in a stackpanel horizontally which is inside a scrollviewer. When user swipe the page ,the scrollviewer stops at certain position, if the scroll stops in the middle of 2 images like the first image shown below i want to set the image with number 3 to be automatically scroll and fit with the left side of the screen like in the second image for (int i = 0; i <= 9; i++) { Uri uri = new Uri("http://d1mu9ule1cy7bp.cloudfront.net//catalogues/47/pages/p_" + i + "/thump.jpg");

How to zip and unzip root folder in isolated storage containing subfolders and files

无人久伴 提交于 2019-12-11 17:27:43
问题 I have problems in using SharpZipLib with isolated storage in WP7 to zip subfolders in isolated storage. My folder structure is like I'm having a rootFolder in isolated storage and inside that there is subFolder having some text files and more subfolders (contains .jpg and .png). I could go for Dotnetzip but I'm not sure it is available for WP7 or not and about its usage. I am able to get all the file pathes in a list by recursively traversing on root folder. At present I am able to zip

How to get the number of Processors on Windows Phone

旧城冷巷雨未停 提交于 2019-12-11 15:41:15
问题 I'm wondering how to get the number of processors on Windows Phone... as documented in the MSDN the following statement always throws a MethodAccessException: Environment.ProcessorCount Any help would be appreciated. Thanks, j3d 回答1: According to this forum post, which links to the MSDN doc that you mentioned, you can't get the processor count programatically on Windows Phone. 回答2: As described in MSDN this Property has a SecurityCriticalAttribute that makes for internal only, you can't use

How VerticalOffset changes when Scrollable height changes while having list inside a list

天大地大妈咪最大 提交于 2019-12-11 12:43:38
问题 I am making a WP7 app which has a Listbox of UserControls. Each UserControl has an ItemsControl and Button(for getting more results). On click of the button the ItemsControl items will be increased by 5 or 10. Now on clicking on the GetMore button of any of the usercontrols except the first or last, there will be an increase in Scrollable height(Total height of the listbox) of the ListBox but the VerticalOffset(position of scrollbar from top) of the ListBox remains same. Now the problem I am

Infinite Scrolling - Windows Phone 7/8

梦想与她 提交于 2019-12-11 11:46:58
问题 I'm trying to implement the "infinite scrolling" within a Windows Phone 7.1 project. Most other posts point to this MSDN Blog link. I'm struggling to implement this though, because it doesn't really give much away as to how it works or where to put the code. Also, when I paste the code, it appears to have spaces missing, so I have been through the code and added missing spaces and editing it to the best of my knowledge. I have added the XAML code to the <Application.Resources> of the App.xaml

Windows Phone - Udp

元气小坏坏 提交于 2019-12-11 11:44:15
问题 Does anyone try using Udp Unicast on Windows Phone 7.1 (RC)? I have a few questions that I like to ask you guys. According to the document http://msdn.microsoft.com/en-us/library/system.net.sockets.socket(v=VS.95).aspx, the only supported ProtocolType is the TCP protocol. Does it mean Udp Unicast is not fully supported? I found that we can only call ReceiveFromAsync at the Completed event of SendToAsync. Otherwise, it will throws "An invalid argument was supplied" exception. Why does it work

How to implement Live Streaming on Windows Phone

我与影子孤独终老i 提交于 2019-12-11 11:21:37
问题 I want to implement Audio Live Streaming on Windows Phone. most of them told Windows Phone 7 sdk does not support Streaming. so I upgrade and install Windows Phone 7.1. Which class i want to use to implement Live Streaming????? Please give some guidelines and materials to do this task. Thanks in advance. 回答1: You may want to consider using IIS 7.X for the streaming portion. The following link shows how you can build the client app for Windows Phone 7: http://www.iis.net/community/default.aspx

Monitor phone call length?

雨燕双飞 提交于 2019-12-11 09:57:06
问题 I would like my sales staff to click a button, which makes a phonecall and registers the length of the call. Is it possible to monitor the length of a phonecall? Thanks 回答1: No, the PhoneCallTask does not provide this kind of information. But you could register the current time just before the call starts and get the current time when the app resumes. However, this might be longer than the actual phone call when the user or phone decides to do something else in between. EDIT Apparently, after

Alternatives for WaitHandle.WaitAll on Windows Phone?

…衆ロ難τιáo~ 提交于 2019-12-11 09:36:04
问题 WaitHandle.WaitAll throws a NotSupportedException when executed on Windows Phone (7.1). Is there an alternative to this method? Here's my scenario: I am firing off a bunch of http web requests and I want to wait for all of them to return before I can continue. I want to make sure that if the user has to wait for more than X seconds (in total) for all of these requests to return, the operation should be aborted. 回答1: You can try with a global lock. Start a new thread, and use a lock to block