windows-phone

Windows Phone 8.1 - Write text over WriteableBitmap

丶灬走出姿态 提交于 2019-12-11 11:42:59
问题 In an app that I'm making I need to write text over a WriteableBitmap. In Windows Phone Silverlight I know how to do it: I only need to call writeableBitmap.Render() method, that's all! The problema is that my app needs to be built with Windows Runtime, and that method doesn't exist. My first approach was to write a method that performs drawing of numbers (I only need to draw numbers) over the WriteableBitmap, but, with this method, numbers appear a Little "robotic", they are all square and

Communication between HTML in WebBrowser and windows phone app

 ̄綄美尐妖づ 提交于 2019-12-11 11:37:34
问题 I have some static html files downloaded into Isolated store. I am trying to open those files using Web Browser control inside windows phone app. Now every HTML file will communicate with back-end code through javascript, and window.external.notify() is not able to apply for all html pages. So my question is, Is there any API like (in iOS) WebViewJavascriptBridge and GAJavaScript or like (android) Javascript Interface available for windows phone 8 which will communicate with HTML in

Cyclic tile template Windows Phone 8.1

血红的双手。 提交于 2019-12-11 11:30:13
问题 I am trying to create cyclic tile template using this code TileUpdateManager.CreateTileUpdaterForApplication().EnableNotificationQueue(true); var tileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquare150x150Image); var tileImage = tileXml.GetElementsByTagName(“image”)[0] as XmlElement; tileImage.SetAttribute(“src”, “ms-appx:///Assets/image1.jpg”); var tileNotification = new TileNotification(tileXml); TileUpdateManager.CreateTileUpdaterForApplication().Update

ToggleSwitch color/styling

假装没事ソ 提交于 2019-12-11 11:16:27
问题 I got an issue that my ToggleSwitch is white like this picture below shows: I want to style the white part to be black. How do I do that? I've changed the default style but no option seems to change it? Here is my style for it: <Style x:Key="ToggleSwitchStyle" TargetType="toolkit:ToggleSwitch"> <Setter Property="Background" Value="{StaticResource PhoneBackgroundBrush}"/> <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilyLight}"/> <Setter Property="FontSize" Value="

WriteableBitmap or PNG writer memory leak?

元气小坏坏 提交于 2019-12-11 11:15:00
问题 I am building a small Windows Phone 8 app (a Christian-Orthodox calendar) which has a background agent which should update the live tile. The app will require access to the contacts in the phone so I opted out of internet access so backend tile generation is, at least now out of question. I personally would not trust an app that has access to my contacts AND to internet. Recently my scheduled agent (which generates three PNGs) started OutOfMemoryException-ing on me. Consistently. I've used

How do I play sound when app begins windows phone

你。 提交于 2019-12-11 11:09:51
问题 On my windows phone app, I want to play a short .wav audio, similar to windows when it boots up. At first I tried using an event handler when one of my controls was loaded (this worked about 60% of the time, which is very interesting, maybe someone can clear that up as well, I'm thinking it has to do with the order things happen to load. That's why its different each time running it). I'm using visual studios 2012 ultimate, this is my xaml code for the .wav file: <MediaElement x:Name="MySound

How to set UI language in code for Windows Phone application?

别等时光非礼了梦想. 提交于 2019-12-11 10:51:07
问题 Let's say my application doesn't support culture es-MX so when this is the current setting on the phone I'd like to set the culture to es-ES. Is this possible to do in Windows Phone and if so how? 回答1: This is definitely possible! See this list for cultures and their identifiers So for example in the App.xaml.cs constructor you could access Thread.CurrentThread.CurrentCulture to determine the actual culture the app is running in. Now if you want to force the UI to use another culture you can

How to prevent “You have already authorized this app” message on Facebook connect in WP8.1?

萝らか妹 提交于 2019-12-11 10:49:51
问题 I'm learning to integrate facebook login in WP8.1. My problem is that I need facebook to ask me for my credentials every time I press the connect button but it does not do that, it remembers the last log in and prompts "You have already authorized my_app_name". How do I go around this? Is there anyway I can prevent facebook to remember the last login? I've followed THIS tutorial, just fyi Any help would be really appreciated. Thanks. 回答1: I figured out the solution to this. When the user taps

When should I load data in a Windows Phone 8 application?

非 Y 不嫁゛ 提交于 2019-12-11 10:49:21
问题 I've seen a lot of questions here related to the OnNavigatedTo method, but none of them seem to answer the basic question of, "At what point should I load data?" The documentation on MSDN doesn't explicitly answer this question, as far as I can tell. If I need to load a list of data from the local database, which method is the most appropriate to use? Should I use the OnNavigatedTo method, or the Loaded event? What I've been using so far is this pattern, which seems to work well: protected

Visual Studio 2015 Error “Cannot resolve Assembly or Windows Metadata file 'Windows.winmd'”

六眼飞鱼酱① 提交于 2019-12-11 10:43:01
问题 I have a project, on another PCs can build it. But my main pc can't. Errors: 1: "Cannot resolve Assembly or Windows Metadata file 'Windows.winmd'" 2: "Type universe cannot resolve assembly: Windows, Version=255.255.'255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime." I tried reinstall the WIN10 SDK and the VS2015, but the errors are same. It is an Universal Store App. 回答1: I could solve the problem. I uninstalled all SDK, all VS, all developer tool. After reinstall the