windows-phone-7

Load more items into ListBox when scrolled to bottom

ε祈祈猫儿з 提交于 2020-01-02 10:05:59
问题 I've got ListBox bound to List. I want to load more items when scrolled to bottom of list so that some animation indicating loading is shown and bound list is expanded. If I understand correctly, I can use ObservableCollection instead of List and expand that collection. Also, I could wrap ItemPresenter into StackPanel with ItemPresenter and Image at bottom. But how do I detect that list has been scrolled to bottom and initiate expanding of collection? 回答1: Check tutorials: http://blog

How to prevent Panorama scrolling from last item to first item in a Windows Phone 7 app

£可爱£侵袭症+ 提交于 2020-01-02 09:29:13
问题 Can it be prevented that, when the user is viewing the last PanoramaItem, that he can scroll further to the right? - which moves back to the the first PanoramaItem. (and, vice-versa, preventing to scroll from the first to the last by swiping to the left) I'm asking this because in my app I have a panorama-page with only 2 PanoramaItems. The user can scroll from one to the other by swiping to the left or to the right. I want to prevent that other animation when scrolling beyond the last

Silverlight with XNA vs purely HTML5

♀尐吖头ヾ 提交于 2020-01-02 07:54:27
问题 I recently decided to go into WP7 app development, but haven't actually started learning silverlight/xna; Only C#. I already know C++ quite well. my Dad, who works for Microsoft, has recently told me that there's no point to learning Silverlight because it will become irrelevant in the long run; due to HTML5's superiority. However, Im not aware of any way to develop apps for WP7 using HTML5, and I barely know anything about markup languagez anyway. I wanted to get some proffesional advice on

Saving Image in MediaLibrary

夙愿已清 提交于 2020-01-02 07:47:27
问题 I am using listbox where I am populating the listbox with the images with the absolute uri. Now i need to save the images to my media library within my phone. But when I try: Application.GetResourceStream(new Uri(imageurl, UriKind.absolute)) it fires an exception. Is there any way to solve this problem. Thanks in advance. 回答1: Here's what I found as solution and it worked: WebClient client = new WebClient(); client.OpenReadCompleted += (s, e) => { if (e.Error == null) { MediaLibrary library =

How to draw shapes in WP7 with the finger?

心已入冬 提交于 2020-01-02 07:41:10
问题 How to draw shapes in WP7 with the finger? I am trying to implement a simple paint application but I am not sure how to make the drawing. 回答1: fingerpaint is your friend try it out on Ruby using http://script.iron7.com/#/Script/Detail?scriptId=FingerPaint&userLowerCaseName=iron7 or in C# at http://sigurdsnorteland.wordpress.com/2010/10/20/fingerpaint-a-little-wp7-paint-app/ Note that the two sets of code aren't quite the same - the C# fingerpaint had some issues about drawing new tracks on

How to get the Windows Phone system language from code?

隐身守侯 提交于 2020-01-02 07:09:11
问题 Solution: Use CultureInfo.CurrentUICulture User can change the system language of Windows Phone at: Settings > language+region > Phone language How can I get the selected language (Phone language) from C# code? Below is my phone settings: Here is my code snippet: System.Diagnostics.Debug.WriteLine( "************************************* CultureInfo.CurrentCulture.Name = " + CultureInfo.CurrentCulture.ToString() + ", " + "CultureInfo.CurrentCulture.CompareInfo = " + CultureInfo.CurrentCulture

How to get the Windows Phone system language from code?

瘦欲@ 提交于 2020-01-02 07:09:08
问题 Solution: Use CultureInfo.CurrentUICulture User can change the system language of Windows Phone at: Settings > language+region > Phone language How can I get the selected language (Phone language) from C# code? Below is my phone settings: Here is my code snippet: System.Diagnostics.Debug.WriteLine( "************************************* CultureInfo.CurrentCulture.Name = " + CultureInfo.CurrentCulture.ToString() + ", " + "CultureInfo.CurrentCulture.CompareInfo = " + CultureInfo.CurrentCulture

What are the common relationships between Views, Models, and ViewModels?

血红的双手。 提交于 2020-01-02 06:25:33
问题 I'm working on a Windows Phone 7 app with a designer. I've done C# development with XNA so I know C# but was not familiar with the Model/View/ViewModel architecture. Our first crack at it had multiple ViewModels active for any given view. Each ViewModel was an in-between layer for each object in our model. For example: We had a "Friends" page that has a ListBox that displays the list of Friends. So we made a FriendsListViewModel that would handle getting an ObservableCollection<Friend> from

Incorrect page height in jQuery Mobile

隐身守侯 提交于 2020-01-02 05:25:32
问题 I'm developing a web application using jQuery Mobile 1.2.0 and the page height is being calculated correctly on iOS and Android but not on Windows Phone, which has a gap on the bottom of the page. Any idea how I can fix it, preferably only with CSS? <!DOCTYPE html> <html> <head> <title>Hello World jQuery Mobile</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/jquery.mobile-1.2.0.min.css" /></script> <script type="text/javascript"

Creating BitmapImage on background thread WP7

≡放荡痞女 提交于 2020-01-02 05:19:08
问题 I'm receiving an UnauthorizedAccessException ("Invalid cross-thread access.") when running the following code on a background (threadpool) thread, is this expected behaviour? var uri = new Uri("resourcevault/images/defaultSearch.png", UriKind.Relative); var info = Application.GetResourceStream(uri); // this line throws exception.... this.defaultSearchImage = new BitmapImage(); 回答1: The reason is because your background thread cannot directly be used to update the UI. Instead, you need to use