windows-phone

Unable to show alert via Javascript in WP7 web browser control

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 08:11:48
问题 I am trying to show alert box using javascript in a webpage using web browser control in WP7. The alert is not popping up. Is there anything wrong in the code or WP7 doesn't support it at all? <phone:WebBrowser Name="browser" IsScriptEnabled="True" ScriptNotify="browser_ScriptNotify" Source="Default.html"/> Inside Default.html <html><br> <head><br> </head><br> <body onload="onLoad()"><br> <script type="text/javascript"><br> function onLoad() {<br> alert("hello");<br> }<br> </script><br> <

Winphone project type is not supported in Visual studio 2017

不羁的心 提交于 2019-12-11 07:58:58
问题 I have an existing xamarin native project and It has myproj.iOS myproj.Droid myproj.WinPhone I uninstalled my visual studio 2015 and installed Visual studio 2017 Now in the solution explorer I can see it clearly says myproj.WinPhone (incompatible) I am aware Microsoft is pushing for UWP but I still want to do as I was doing earlier like supporting windows 8.1 etc.. Is it possible to downgrade this to 2015 so that I can still do myproj.WinPhone ? Or is there anyother way that will solve this

wp7 how do i hide or remove header div for web page

天大地大妈咪最大 提交于 2019-12-11 07:31:34
问题 I am developing simple app and i want lode and display the web page on image tap but i don't want to display header div content that contains menu, logo image. for that am able to call and display the web page using web browser control on my C# code id private void image_Tap(object sender, GestureEventArgs e) { webBrowser1.Navigate(new Uri("http://www.my-url.com", UriKind.Absolute)); } that works fine. and now how can i remove header tag data(content in b/w < header >< /header > divs). thanks

OnNavigatedTo is called two twice on app resuming

江枫思渺然 提交于 2019-12-11 06:29:31
问题 I'm having trouble with my WP8 app. It uses the MVVM light library for the creation of the ViewModel and is also used for the page navigation with Messages. Right now I'm having some problems with the OnNavigatedTo Method of my MainPage. If I start the app for the first time, it is called once. If I close and reopen it with the back button, it is also only called once. The constructor of my MainPage ViewModel will also be called only once. If I let the application open in the background and

Json Serialization for Windows Phone

£可爱£侵袭症+ 提交于 2019-12-11 06:18:40
问题 I was trying to implement parsing a JSON response as shown here for my Windows Phone 7 project in C#. But I am stuck with a compilation error as "The type or namespace name 'Serializable' could not be found (are you missing a using directive or an assembly reference?)" I have the imports using System.Runtime.Serialization; using System.Runtime.Serialization.Json; I am not sure what are import I am missing. I tried to include using System.ServiceModel.Web; But the Web part is not recognized. I

Code Contracts not working in Windows Phone 8 unit test

拈花ヽ惹草 提交于 2019-12-11 06:06:31
问题 When my unit test runs a method that has Contract.<>, it is failing with an error: An exception occurred while invoking executor 'executor://mswptestadapter/v1': Object reference not set to an instance of an object. ========== Run test finished: 0 run (0:00:28.8388006) ========== Here is contracts settings in pxproj file. <CodeContractsEnableRuntimeChecking>False</CodeContractsEnableRuntimeChecking> <CodeContractsRuntimeOnlyPublicSurface>False</CodeContractsRuntimeOnlyPublicSurface>

Access is denied error windows phone 8

China☆狼群 提交于 2019-12-11 05:56:55
问题 I am getting error on following line StorageFolder picturesFolder = KnownFolders.PicturesLibrary; Exception is: ex {System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) at Windows.Storage.KnownFolders.get_PicturesLibrary() at WinTooth.MainPage.d__0.MoveNext()} System.SystemException {System.UnauthorizedAccessException} I have also added lines to register for a file association extension. Please suggest/help. 回答1: http://msdn.microsoft.com

Digest authentication in Windows Store app using HttpClient (C#)

∥☆過路亽.° 提交于 2019-12-11 05:53:38
问题 I'm struggling with this problem for a week. I have to use API with Digest authentication in Windows Store App, but while I'm using this code I get System.ArgumentNullException in this line of code: HttpHandler.Credentials = credCache; Here is rest of code: var credCache = new CredentialCache(); credCache.Add(new Uri("https://myserverIP/api"),"Digest",new NetworkCredential("mylogin", "mypassword") ); var HttpHandler = new HttpClientHandler(); HttpHandler.Credentials = credCache; var

Custom List Box item style

瘦欲@ 提交于 2019-12-11 05:43:52
问题 I have a style like below: <!-- ListBox ItemTemplate style. --> <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem"> <Setter Property="Background" Value="Transparent"/> <Setter Property="BorderThickness" Value="0"/> <Setter Property="BorderBrush" Value="Transparent"/> <Setter Property="Padding" Value="0"/> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Template"> <Setter.Value>

How to localize files in Windows Phone 8

*爱你&永不变心* 提交于 2019-12-11 05:39:20
问题 We add key/value pairs in AppResources for each language then easily use it in binding. But I have a long list of names of countries in a separate XML file for each language written in its own script. Now, how can I use for french the french XML file and for english the english one? (Answer to the coming question: "what have you tried or where is your code?", infact I'm at the beginning so no code, but I searched but didn't find any result, personally, sorry!) 回答1: First, why not just convert