windows-phone-8.1

Set system volume in Windows Phone 8.1

↘锁芯ラ 提交于 2019-12-12 13:33:51
问题 Can I set system volume from code behind? I know that in WP8 no way to do this. Maybe in WP8.1 ms added some api for system volume access? 回答1: This is not possible I have tried using the WASAPI drivers from Microsoft. As an added note quoting from MSFT support James Dailey: AFAIK there is no good way to manipulate the global audio level on Windows Phone 8.1 (WP8.1). Theoretically you can change the audio volume of any app that uses the default audio session “zero”. However, if the app

Navigating to page increases memory usage Windows Universal 8.1

时光毁灭记忆、已成空白 提交于 2019-12-12 13:17:48
问题 I'm creating a Windows Universal 8.1 application. Everytime I navigate to a page and then navigate back and then to the page again a new instance of the page is being held in memory. Obviously the garbage collector frees the memory after a while, however I'd rather not use the memory if it's unneeded. Is there a way to recycle or dispose of these pages? 回答1: In Windows Uriversal App, We can use NavigationCacheMode to recycle a page. It can be set in the constructor of the page. For example,

How to pin a secondary tiles for each listview clicked item in windows phone 8.1

筅森魡賤 提交于 2019-12-12 13:12:18
问题 I've displaying a list in another page, when a listitem is clicked the control transferred to another page where I was pin that clicked data. I can pin the the secondary tile for one event to start panel using pin appbar button . It is showing that the page is already pinned. Now, I would like pin new tiles for each clicked listview item. I can get the id of the selected item in a list. So Is it possible to check for each id that,whether the pinbar is activated or not..? Here the code which I

Saving an image from the web to the Saved Pictures folder in Windows Phone 8.1 RT C#

自古美人都是妖i 提交于 2019-12-12 12:27:20
问题 How can I save an image to the Saved Pictures folder in Windows Phone 8.1 RT? I downloaded the image from the web using HttpClient. 回答1: You just need this var url = "Some URL"; var fileName = Path.GetFileName(url.LocalPath); var thumbnail = RandomAccessStreamReference.CreateFromUri(url); var remoteFile = await StorageFile.CreateStreamedFileFromUriAsync(fileName, url, thumbnail); await remoteFile.CopyAsync(KnownFolders.SavedPictures, fileName, NameCollisionOption.GenerateUniqueName); You need

Can't open Windows Phone project in Windows 8.1+ Universal App using Visual Studio 2015 RC

心已入冬 提交于 2019-12-12 12:05:06
问题 Trying to open a Universal App for Windows 8.1+ in the Visual Studio 2015 RC and everything aside from the Windows Phone project opens fine. Error Message: "The application which this project type is based on was not found." Link given by message - Visual Studio 2013 Compatibility The project file says VS 12 so I'm pretty sure I created it in VS 2013. Is there any way to open the project without recreating the entire solution? 回答1: Grabbed the VS 2015 RC ISO and started up the install. I

Reading the response from HttpClient.GetStringAsync

本秂侑毒 提交于 2019-12-12 11:53:13
问题 I am working on a Windows Universal app using the new runtime for Windows Phone/Store apps. I am sending a request to a server using the following code and expecting a HTML response back. However when I return the string and display it in the UI, it just says: "System.Threading.Tasks.Task'1[System.String]" It's not showing me the actual HTML/XML that should be returned. When I use the same URL in a normal Windows Forms app, it's returning the data I expect but the code I use there is

Webview BaseURL in Xamarin.Forms on UWP and Windows Phone 8.1

江枫思渺然 提交于 2019-12-12 11:12:48
问题 In my shared portable Xamarin project, this works on UWP, Windows Phone 8.1 and Windows 8.1: HtmlWebViewSource htmlSource = new HtmlWebViewSource(); htmlSource.Html = @"<html><body><img src='ms-appx-web:///Assets/somePicture.png' /></body></html>"; htmlSource.BaseUrl = DependencyService.Get<IBaseUrl>().Get(); WebView webView = new WebView { Source = htmlSource, }; Obviously, this isn't cross-platform (iOS and Android). I want this, but it doesn't work on UWP, Windows Phone 8.1 and Windows 8.1

BACKGROUNDTASKHOST.EXE' has exited with code 1 (0x1) - Geofence issue

大兔子大兔子 提交于 2019-12-12 10:42:31
问题 I am writing Windows Phone 8.1 Application using GeoFence API. My problem is that I can't trigger change of location in Background Task, because app exits with code 1. I have read multiple threads about this error, but no solution solved my problem. I have checked if my BackgroundTask is a Runtime Component, and it is. I have checked name of my class and it is correct. I have checked if I use any await function in my BackgroundTask function and I didn't find any. I have checked if I

Strange version shown for a Windows Phone 8.1 XAML app

不问归期 提交于 2019-12-12 10:37:28
问题 I have created a Windows Phone 8.1 XAML version of one of my existing app. I set the package version to 1.5.0.0, the created file is called SlovakApps.WindowsPhone_1.5.0.1_AnyCPU_bundle.appxupload. When I upload the file to Dev Center, a strange version is shown: Is this normal? Seems very strange to me. 回答1: From Microsoft support: Yes this is very normal now when you are submitting a package to support Windows Phone 8.1, it automatically generates an version number for your update. 回答2: Do

Display a UI element (Image, Text) in Data Template of a List View on click of List View Item

北战南征 提交于 2019-12-12 10:25:29
问题 The Data Template Code <DataTemplate x:Key="CachelvTemplate"> <Grid Margin="21,3,21,3" Height="60"> <Grid.ColumnDefinitions> <ColumnDefinition Width="auto"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="auto"/> </Grid.ColumnDefinitions> <TextBlock Text="{Binding}" HorizontalAlignment="Stretch" VerticalAlignment="Center" Foreground="Black" FontSize="20"/> <Image Grid.Column="2" Source="/Assets/Icons/selectedCache.png" HorizontalAlignment="Right" VerticalAlignment="Center" Stretch=