windows-phone-8.1

JSON.NET DeserializeObject to List of Objects

巧了我就是萌 提交于 2019-12-30 01:35:42
问题 I'm trying to Deserialize object to list of object using JSON.NET lib. My json file is: [ { "id": 1, "name": "Poczta", "description": "Opis", "latitude": 52.25197, "longitude": 20.896355, "accuracy": 0, "type": "", "image": null }, { "id": 2, "name": "WAT", "description": "Budynek główny - sztab.\r\nzażółć gęślą jaźń", "latitude": 52.2531213, "longitude": 20.8995849, "accuracy": 0, "type": "Uczelnia", "image": null }, { "id": 3, "name": "Przychodnia", "description": "Opis", "latitude": 52

C# XAML Listbox collapse when clicked

百般思念 提交于 2019-12-29 08:15:29
问题 I'm new in XAML for Windows Phone 8.1 and have some troubles with making a Stackpanel clickable collapse Item, when clicked My work so far looks like that: And the Code to that (please correct me, if there are major flaws): <Border CornerRadius="15" Background="#FF595656" Margin="0" Grid.ColumnSpan="2" Height="80"> <StackPanel Orientation="Horizontal"> <StackPanel Width="20" HorizontalAlignment="Left" VerticalAlignment="Top" /> <StackPanel HorizontalAlignment="Left" Height="80" Margin="0,0,0

Windows Phone 8.1 Background Task - Can't Debug and won't fire

此生再无相见时 提交于 2019-12-29 07:17:35
问题 Im having a issue with the Background Tasks in WP8.1 I have created a background task as a windows runtime component following this tutorial : http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh977055.aspx The problem is, i can't get my background task to run. It runs onNetworkChange. When i can to flight mode and back it is not firing. When i go to lifecycle events in the Debug Location toolbar it says No Background tasks. I have debugged the code that registers the background task

How to capture screen programatically in windows phone 8.1 SDK?

梦想的初衷 提交于 2019-12-29 07:07:02
问题 Any Idea how to capture screen in SDK 8.1 windows phone from code? For windows phone 7.5 i have seen the code and tried to use, but it failed. :( 回答1: You can use a RenderTargetBitmap and pass it a FrameworkElement that represents the page and then render a bitmap from that. private async Task<RenderTargetBitmap> CreateBitmapFromElement(FrameworkElement uielement) { try { var renderTargetBitmap = new RenderTargetBitmap(); await renderTargetBitmap.RenderAsync(uielement); return

How to capture screen programatically in windows phone 8.1 SDK?

一世执手 提交于 2019-12-29 07:06:24
问题 Any Idea how to capture screen in SDK 8.1 windows phone from code? For windows phone 7.5 i have seen the code and tried to use, but it failed. :( 回答1: You can use a RenderTargetBitmap and pass it a FrameworkElement that represents the page and then render a bitmap from that. private async Task<RenderTargetBitmap> CreateBitmapFromElement(FrameworkElement uielement) { try { var renderTargetBitmap = new RenderTargetBitmap(); await renderTargetBitmap.RenderAsync(uielement); return

How to set Supported orientations property in Windows Phone 8.1

北城余情 提交于 2019-12-29 06:52:32
问题 I wrote an application for WP 8 some time ago, I'm currently working on updating it for WP 8.1. My XAML and C#-skills have improved a lot since the initial launch, so I decided to rewrite it from scratch in order to avoid digging through old, noob code (yeah... it isn't pretty). One thing that I can't seem to get my head around is how to deal with enabling and disabling orientation-changes for the app. I've found a way to make a total enable/disable with the "Package.appmanifest". That's not

How to set Supported orientations property in Windows Phone 8.1

扶醉桌前 提交于 2019-12-29 06:49:05
问题 I wrote an application for WP 8 some time ago, I'm currently working on updating it for WP 8.1. My XAML and C#-skills have improved a lot since the initial launch, so I decided to rewrite it from scratch in order to avoid digging through old, noob code (yeah... it isn't pretty). One thing that I can't seem to get my head around is how to deal with enabling and disabling orientation-changes for the app. I've found a way to make a total enable/disable with the "Package.appmanifest". That's not

How to add Command Behavior in windows store 8.1 MVVM application

╄→гoц情女王★ 提交于 2019-12-29 04:01:48
问题 I want to invoke a command on TextChange event of new windows phone 8.1 AutoCompleteBox Control. I am using MVVM Light. 回答1: In new windows store 8.1 apps there is a new SDK Behavior SDK for adding behaviors in the application. it is not added by default you have to add this Extension in your project. below is how to add this extension in your project. install the Behavior SDK from the list. Now in your XAML page add following namespaces to InvokeActionCommand that is capable of invoking

Adding contacts to People on Windows Phone 8.1 in C#

懵懂的女人 提交于 2019-12-29 01:58:09
问题 Is there a way to add contacts from my app to the People app on a Windows Phone 8.1? I looked at different things under the Contact class and nothing seems to work. There are different ways (like ContactManager, ContactPicket, etc.) to retrieve data but nothing seems to allow me to add a new contact as most of the stuff like SaveContactTask in Microsoft.Phone.Tasks is not implemented on WP 8.1. J. 回答1: You don't have write access to the primary contact store on Windows Phone 8, but you have

Windows Phone 8.1 Toggling the visibility of a TextBlock in a DataTemplate

旧巷老猫 提交于 2019-12-28 03:10:12
问题 I'm building a Windows Phone 8.1 Hub Application. One of the hub section contains a ListView that displays a list of articles. I'd like to add a Textblock to this hubsection which displays a message when the articles failed to download. The XAML Code is below: <HubSection x:Uid="ArticlesSection" Header="ARTICLES" DataContext="{Binding Articles}" HeaderTemplate="{ThemeResource HubSectionHeaderTemplate}"> <DataTemplate> <Grid> <ListView AutomationProperties.AutomationId="ItemListViewSection3"