windows-phone-8

Issue with reading file on Windows Phone 8 SD card

和自甴很熟 提交于 2020-01-13 12:12:11
问题 I have problems reads the file on Windows Phone SD card. I get the valid Stream object using ExternalStorageFile.OpenForReadAsync. However any seek operation is ignored and position is not moved although the stream CanSeek property is true; private async void ReadFileOnSDCard(ExternalStorageFile file) { Stream stream = await file.OpenForReadAsync(); using (stream) { long curPos= stream.Seek(100, SeekOrigin.Begin); long pos = stream.Position; // both curPos and pos are 0. 回答1: I was fighting

GetRequestToken is not working in TweetSharp on Windows Phone

拜拜、爱过 提交于 2020-01-13 06:42:06
问题 I can't use GetRequestToken in TwitterService anymore and also GetAccessToken! TwitterService service = new TwitterService("ConsumerKey", "ConsumerKeySecret"); service.GetRequestToken(Constants.CallbackUri, (request, response) => { if (response.StatusCode == HttpStatusCode.OK) { Request = request; var uri = service.GetAuthorizationUri(request); Dispatcher.BeginInvoke(() => AuthBrowser.Navigate(uri)); } }); it gives me: 'TweetSharp.TwitterService' does not contain a definition for

Lazy Loading with LongListSelector in LayoutMode=Grid

ぃ、小莉子 提交于 2020-01-13 05:30:33
问题 I'm displaying a collection of images in a LongListSelector on WP8 and I've implemented the well known lazy loading pattern utilizing LLS's ItemRealized event. In the code below OnItemRealized is called for each and every item in the Pictures collection - even for items which are clearly off-screen. In this scenario 24 items fit on screen yet the LLS realizes 40 items and this triggers the ResumeGetPictures() of the ViewModel. When the Pictures collection changes (INotifyCollectionChanged),

Can I send parameters in push notifications to toast (Windows Phone)?

穿精又带淫゛_ 提交于 2020-01-13 02:30:41
问题 I have a case in my app where I need to send a push notification to a user device when the application is offline and appears as a toast notification. I need when the user clicks on the toast message to navigate to a specific page in my application depending on the message. I know that this is available in toast notifications but can I send parameters from my server to the toast to determine the page? 回答1: Of course you can. The XML of the toast notification you send from your server looks

How can i add AppBar in Windows Phone 8.1

╄→гoц情女王★ 提交于 2020-01-12 13:41:54
问题 In windows phone 8, its very easy to add an App Bar and manage it, but now i test new windows phone 8.1 SDK to build a project with new Geofencing feature but i don't know how to add an App Bar in the App. 回答1: In Windows Phone 8.1, We can use BottomAppBar to add App Bar. Usually we use CommandBar to create basic BottomAppBar. CommandBar contains two collection: PrimaryCommands and SecondaryCommands , It's similar with shell:ApplicationBar.Buttons and shell:ApplicationBar.MenuItems in Windows

WP8 Orientation change animations

做~自己de王妃 提交于 2020-01-12 09:07:26
问题 What is the easiest way to add orientation change animations to my Windows Phone 8 application? I am interested in something that looks like in native apps like Messages, Calendar, etc. I was looking for a quick and simple solution and the only thing I found working was DynamicOrientionChanges library in NuGet, but it has a huge problem with framerate on Windows Phone 8. 回答1: You can use the Windows.Phone.Toolkit and handle the OrientationChangedEvent, as showcased here: http://mobileworld

Get Value from JSON using JArray

别说谁变了你拦得住时间么 提交于 2020-01-12 07:39:08
问题 I have the following string (json format) I have gotten from my server: {[{"ruta": "1","division": "7"},{"ruta": "2","division": "7"},{"ruta": "3","division":"7"},{"ruta": "4","division": "7"},{"ruta": "5","division": "7"},{"ruta": "23","division": "7"}]} I want to get each value and save them in string variables in order to save them in a data base. For that I am trying to do as follows: JArray jarr = JArray.Parse(result); foreach (JObject content in jarr.Children<JObject>()) { foreach

Why can't I use htmlagilitypack with windows phone 8? What else can I use to Parse HTML in WP8?

早过忘川 提交于 2020-01-12 04:44:06
问题 Why can't I use htmlagilitypack with windows phone 8? I appears to be supported on all platforms including Win8 Win8RT and WP7/WP7.5 and Silverlight 5. Is there one of the DLLS that would work? What else can I use to Parse HTML in WP8? All suggestions are for the htmlagilitypack. 回答1: The issue appears to be that the NuGet package references the incorrect assembly for WP8. By default it seems that it references the binary in sl4-windowsphone71, manually removing the reference to the

ObservationCollection that implements ISupportIncrementalLoading within ViewModel inside PCL using MVVM architecture for WinRT & WP8/WinPRT support

邮差的信 提交于 2020-01-12 03:39:08
问题 I have my ViewModels inside a PCL, because I'm developing a Windows 8.1 and Windows Phone app in parallel. I have a list of things inside my ViewModel as an ObservableCollection. I have a GridView inside a Page inside a Windows 8.1 project. I wish to incrementally load items from my list of things in my ViewModel. Normally I would implement ISupportIncrementalLoading inside a custom subclass of ObservableCollection, however, given that my ViewModel is inside a PCL, ISupportIncrementalLoading

Change FontSize to fit TextBlock

允我心安 提交于 2020-01-12 03:28:27
问题 I'm developing Windows 8 Store Application, we know that display sizes are very different, so all the elements have stretchable settings, so that if display is small elements (pictures, charts etc. ) are smaller, if display is big - bigger. All works perfectly except TextBlocks (labels): TextBlock element itself also is being stretched, but the FontSize remains the same, how i noticed there is no property to change font size to fit TextBlock. Is there a way to change FontSize of the TextBlock