windows-phone

WinPhone 8 AppBar icon size

自作多情 提交于 2019-12-09 16:28:37
问题 The guide for Windows Phone 8 app bars states that AppBar button icons should be 48x48px. It also says that a bunch of sample icons can be found in C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Icons . But the images in there are 76x76px. And they work fine, at least on the emulator they do. So what's the proper size? 回答1: So what's the proper size? 76x76, because then you support higher resolutions. If you use 48x48, it'll be scaled up for WXGA and 720p, rather than down (for WVGA

How to avoid the screen to lock while the Windows Phone is plugged in

流过昼夜 提交于 2019-12-09 15:00:58
问题 Easy as that, in android there's a setting called Stay awake that will prevent your phone to lock down while you're using it for debugging an app. I'm looking for the same thing (could be better) for Windows Phone 8.1. Every time I hit F5 I need to unlock my phone or I would get the following error: DEP6600 : Deployment failed. Cannot deploy app when device screen is locked. Please make sure that the device screen is not locked, and try again. or Error: Application launch failed. Ensure that

Support for XNA in WP8?

我的未来我决定 提交于 2019-12-09 14:51:51
问题 After watching a little bit of the summit keynote I kind of heard conflicting reports about it, but is it official that XNA is being dropped for WP8? I'm guessing since the future version of WP supports previous generation of apps that this is probably not true. If it is though is using C# even an option for games or is C++ with DirectX the only way to go? 回答1: the official wp7dev twitter account had this to say too "XNA Framework apps are fully supported in WP8. The new WP SDK will support

Stopping notification bar to popup during game play

吃可爱长大的小学妹 提交于 2019-12-09 13:07:30
问题 Context: I am working on a windows phone game using XNA 4.0 framework. During the gameplay, if the user accidentally drags the top of screen, notification center gets dragged down. I have seen few apps where this behaviour is overridden and instead of notification center popping up, a small cue is shown at the top as shown in the screenshot below. Question: What is the API that stops notification center to come up when user accidentally drags the top of screen during gameplay? Screenshot of

How to get a deep link of my application from the Windows Phone Marketplace using .NET code?

拥有回忆 提交于 2019-12-09 06:46:26
问题 How do I get a deep link of my application programmatically from the Windows Phone Marketplace, so that I can use it in my code? 回答1: Getting the AppDeeplink is quite useful for example in ShareStatusTask and ShareLinkTask. It is possible, however you have to use some non-trivial code for getting the real AppID from within your app Manifest file. Here's what I do: First save somewhere in resources the string for Windows Phone app deeplinks, this is simple: "http://windowsphone.com/s?appId={0}

Using Youtube v3 Api key

时间秒杀一切 提交于 2019-12-09 04:46:28
I'm trying to build an youtube based app, and I'm using version 3.0 of Youtube Data API, I did register the app in Google Cloud Console and I did obtain an API Key. After that I tried to test it in a console application in Visual Studio 2010, I used a WebClient to retrieve a video search using this URL " https://www.googleapis.com/youtube/v3/search?part=snippet&q=YouTube+Data+API&type=video&key= {MY API KEY}" I learned this from here . I used both a Browser key and a Server key, but the server sends back an error saying the request is incorrect. So can anyone point me to the error I'm making?

JSON Can't be Deserialized to Object, Needs Array?

我的未来我决定 提交于 2019-12-09 01:06:03
问题 I am trying to take the incoming JSON items and bind them to listbox items but I am told by visual studio that I need to do an Array and not Object? I've never had to do this... Anyone know how? My RootObject: public class RootObject { public string url { get; set; } public string display { get; set; } public List<string> genetics { get; set; } public List<string> price { get; set; } public List<string> brandMaker { get; set; } public string form { get; set; } public string dosornos { get;

How to download an image from an URI and create a bitmap object from it?

社会主义新天地 提交于 2019-12-08 17:21:18
问题 I'm trying to download image from a website and create bitmap based on that image. It looks like this: public void test() { PostWebClient client = new PostWebClient(callback); cookieContainer = new CookieContainer(); client.cookies = cookieContainer; client.download(new Uri("SITE")); } public void callback(bool error, string res) { byte[] byteArray = UnicodeEncoding.UTF8.GetBytes(res); MemoryStream stream = new MemoryStream( byteArray ); var tmp = new BitmapImage(); tmp.SetSource(stream); } I

How to get the latest char written in textbox?

 ̄綄美尐妖づ 提交于 2019-12-08 16:53:21
问题 I want to know how to get the latest char written in TextBox. It does not mean the last of the string. For instance, I write this : This i a test. But I forgot 's', so I move my finger to the 'i' and I add the 's' : This is a test. So, how can I get the 's' ? I want to get it in char or string, but I don't know how to do... I hope it is clear. 回答1: If you want to get the last written character, then subscribe TextBox to the KeyDown event: C#: textBox.KeyDown += textBox_KeyDown; XAML: <TextBox

Images from Assets Folder are not working in UWP app

怎甘沉沦 提交于 2019-12-08 16:45:26
问题 The Images are working in the MainPage, but I'm trying to Integrate it in an Navigational Panel Templete and the images don't show up. Can anyone suggest me what might be the problems. The Templete's making use of FRAMES but that should not be the issues. XAML code <Button Grid.Column="0" Style="{StaticResource NavigationButtonStyle}"> <StackPanel Orientation="Horizontal"> <Image Source="Assets/donut-icon.png" Style="{StaticResource IconImageStyle}" /> <TextBlock Text="Donut" Foreground=