windows-phone-7

DownloadStringTaskAsync on WP7 hangs when retrieving Result

戏子无情 提交于 2020-02-07 03:13:45
问题 I converted a bunch of WP7 code to use DownloadStringTaskAsync instead of DownloadStringAsync using the Async CTP SP1. It wasn't working so I boiled down my code a bunch and ended up with these 2 lines: var wc = new WebClient(); var result = wc.DownloadStringTaskAsync("http://www.weather.gov").Result; If I run this method with a console app on my windows machine. Its works as I expect and I get a string with the contents of weather.gov. If I run the same 2 lines in the constructor of App in a

How to add an application bar to a user control in wp7

早过忘川 提交于 2020-02-07 02:25:27
问题 I have built a wizard style user control that lets you add stackpanel based pages and flick between them. I would like to add an application bar as part of the user control with next and previous buttons that enable/disable based on page displayed etc. Application bar appears to be an attached property of PhoneApplicationPage. I have tried referencing Microsoft.Phone.Shell but get invalid type. Any ideas how I can add it to my user control? 回答1: Application bar is such a pain in the a**. This

How to highlight text in textbox in Windows Phone 7

帅比萌擦擦* 提交于 2020-02-06 06:31:47
问题 In a Windows Phone project I have the following scenario: The user types some text in a textbox The user presses a button which disables the textbox and starts a process Some processing of the text is done and on every step of the processing I want to highlight certain part of the text in the textbox (the text itself does no change). The textbox is enabled after the processing is complete. What is the right way to do this? Currently I have tried to set some selection background and set the

How to highlight text in textbox in Windows Phone 7

牧云@^-^@ 提交于 2020-02-06 06:30:33
问题 In a Windows Phone project I have the following scenario: The user types some text in a textbox The user presses a button which disables the textbox and starts a process Some processing of the text is done and on every step of the processing I want to highlight certain part of the text in the textbox (the text itself does no change). The textbox is enabled after the processing is complete. What is the right way to do this? Currently I have tried to set some selection background and set the

How to highlight text in textbox in Windows Phone 7

こ雲淡風輕ζ 提交于 2020-02-06 06:29:30
问题 In a Windows Phone project I have the following scenario: The user types some text in a textbox The user presses a button which disables the textbox and starts a process Some processing of the text is done and on every step of the processing I want to highlight certain part of the text in the textbox (the text itself does no change). The textbox is enabled after the processing is complete. What is the right way to do this? Currently I have tried to set some selection background and set the

Explicit save vs. implicit save - what to prefer when?

烂漫一生 提交于 2020-02-04 03:53:34
问题 I'm currently developing a wp7 app (don't want to tell too much ;), but I'm struggling a little with the user interaction. The main question, I'm not sure about is: Should I offer an explicit save button in dialogs and use the phone back button as cancel, or should I save implicit the time the user taps the phone back button ... The more I think about, the more I'm unsure about the best user experience. I already read the user experience and interaction guide from Microsoft, but there isn't

Implement NumericUpDown spinner control on Windows Phone 7?

*爱你&永不变心* 提交于 2020-02-03 16:23:21
问题 I need a control to enter small numbers on Windows Phone 7 and would like to have some kind of endless spinner control like the one for entering day and month and the date setting of the device. Is there a standard control to spin through these kind of selections? Or at least some way how to build this kind of control? 回答1: There are a few options here - Nick Randolphs' Windows Phone 7 Wheel Control (Clint Rutkas' updated version) Rudi Grobler's LoopingSelector I hope either of these two

How do I move GPS watcher to App.xaml superclass and Dispatch events to other pages/classes?

 ̄綄美尐妖づ 提交于 2020-02-01 06:35:38
问题 I am new to developing for silverlight/WPF and WP7, however I am familiar with developing C# using console or windows form, so bear with me! I am trying to create a location aware app using the Silverlight SDK and the Microsoft.Maps.MapControl and the System.Device.Location classes. The problem I am having is accessing the "watcher" from other pages. What is the best way to do this. I want to put it outside of my GUI page classes so that when switching between pages, you are not checking for

How do I move GPS watcher to App.xaml superclass and Dispatch events to other pages/classes?

痞子三分冷 提交于 2020-02-01 06:35:25
问题 I am new to developing for silverlight/WPF and WP7, however I am familiar with developing C# using console or windows form, so bear with me! I am trying to create a location aware app using the Silverlight SDK and the Microsoft.Maps.MapControl and the System.Device.Location classes. The problem I am having is accessing the "watcher" from other pages. What is the best way to do this. I want to put it outside of my GUI page classes so that when switching between pages, you are not checking for

How to set WrapPanel itemsource to list?

我的未来我决定 提交于 2020-01-29 02:52:22
问题 I want to show in WrapPanel a list of images. How can I do that or maybe I shall use other control ? 回答1: You can absolutely use the WrapPanel to show a list of images, scrolling vertically or horizontally. To get the kind of panoramic tile effect like in People hub with your images, you could do something like this: <controls:PanoramaItem Header="something" Orientation="Horizontal" Margin="0,-15,0,0" > <ListBox Name="SomeList" Margin="0,0,-12,0" ItemsSource="{Binding SomeItemsList}" >