windows-phone

Error Signing Windows Phone XAP file -> SignTool Error: This file format cannot be signed because it is not recognized

寵の児 提交于 2021-02-19 07:39:05
问题 I've just got my certificate to sign Windows Phone Apps and when I try to run this command: XapSignTool.exe sign /v C:\Temp\MyApp_Release_AnyCPU.xap I'm using Visual Studio 2012 Express. I get an strange behavior: The following certificate was selected: Issued to: XXXXXX Issued by: Symantec Enterprise Mobile CA for Microsoft Expires: XXXXXX SHA1 hash: XXXXX Done Adding Additional Store Successfully signed: C:\Users\Fernando\AppData\Local\Temp\tmp7E47.tmp\MyApp.dll Number of files successfully

An exception of type 'System.Net.WebException'

会有一股神秘感。 提交于 2021-02-11 17:00:15
问题 I'm working on WP7-8 application which is using RestClient for getting info from WebServer. When I swich off internet connection I see: An exception of type 'System.Net.WebException' occurred in System.Windows.ni.dll and wasn't handled before a managed/native boundary What does it mean? How or should I fix it? My code: RestSharp.RestClient _client; _client = new RestClient { BaseUrl = BaseURL }; _client.Timeout = 50; resourceString = "Http:\\blablabla"; var request = new RestRequest {

An exception of type 'System.Net.WebException'

孤街浪徒 提交于 2021-02-11 16:58:39
问题 I'm working on WP7-8 application which is using RestClient for getting info from WebServer. When I swich off internet connection I see: An exception of type 'System.Net.WebException' occurred in System.Windows.ni.dll and wasn't handled before a managed/native boundary What does it mean? How or should I fix it? My code: RestSharp.RestClient _client; _client = new RestClient { BaseUrl = BaseURL }; _client.Timeout = 50; resourceString = "Http:\\blablabla"; var request = new RestRequest {

Run “async” method on a background thread

守給你的承諾、 提交于 2021-02-06 14:28:39
问题 I'm trying to run an "async" method from an ordinary method: public string Prop { get { return _prop; } set { _prop = value; RaisePropertyChanged(); } } private async Task<string> GetSomething() { return await new Task<string>( () => { Thread.Sleep(2000); return "hello world"; }); } public void Activate() { GetSomething.ContinueWith(task => Prop = task.Result).Start(); // ^ exception here } The exception thrown is: Start may not be called on a continuation task. What does that mean, anyway?

Run “async” method on a background thread

六月ゝ 毕业季﹏ 提交于 2021-02-06 14:26:52
问题 I'm trying to run an "async" method from an ordinary method: public string Prop { get { return _prop; } set { _prop = value; RaisePropertyChanged(); } } private async Task<string> GetSomething() { return await new Task<string>( () => { Thread.Sleep(2000); return "hello world"; }); } public void Activate() { GetSomething.ContinueWith(task => Prop = task.Result).Start(); // ^ exception here } The exception thrown is: Start may not be called on a continuation task. What does that mean, anyway?

Run “async” method on a background thread

天大地大妈咪最大 提交于 2021-02-06 14:26:00
问题 I'm trying to run an "async" method from an ordinary method: public string Prop { get { return _prop; } set { _prop = value; RaisePropertyChanged(); } } private async Task<string> GetSomething() { return await new Task<string>( () => { Thread.Sleep(2000); return "hello world"; }); } public void Activate() { GetSomething.ContinueWith(task => Prop = task.Result).Start(); // ^ exception here } The exception thrown is: Start may not be called on a continuation task. What does that mean, anyway?

How do I reuse VisualState, VisualStateGroup and VsualStateManager in shared resource?

落花浮王杯 提交于 2021-02-06 09:32:06
问题 I created many buttons that it use the same VisualStateManager, VisualStateGroup and VisualState in my Windows Phone project. Then, I want to reuse all of them as the shared resources as the other type of an element such as margin, colors etc. But I found only the way to reuse storyboard that it would be better if I can reuse all of the VisualState. Is there solution of the reusable VisualState? 回答1: The solution I found I tested on Windows 10 UWP app, I have tested several options like

How do I reuse VisualState, VisualStateGroup and VsualStateManager in shared resource?

我的未来我决定 提交于 2021-02-06 09:31:50
问题 I created many buttons that it use the same VisualStateManager, VisualStateGroup and VisualState in my Windows Phone project. Then, I want to reuse all of them as the shared resources as the other type of an element such as margin, colors etc. But I found only the way to reuse storyboard that it would be better if I can reuse all of the VisualState. Is there solution of the reusable VisualState? 回答1: The solution I found I tested on Windows 10 UWP app, I have tested several options like

How do you get the button name/tag when the event button.click occurs?

放肆的年华 提交于 2020-03-18 04:12:27
问题 I'm making buttons programatically and adding them to a stack panel so the buttons change each time the user navigates to the page. I'm trying to do something like this where when I click the created button it'll grab the tag of the button and go to the correct page. However, I can't access the button elements using RoutedEventHandler. Here's the code: foreach (item in list) { Button newBtn = new Button(); newBtn.Content = "Button Text"; newBtn.Tag = item.Tag; newBtn.Name = item.Name; newBtn