windows-store-apps

Mediaelement in Windows 8 Metro App

送分小仙女□ 提交于 2019-12-11 08:55:55
问题 I have a scenario specific to my app. I am managing music file playlist in XML for my metro app. And its saving music files actual path like this D:\MyMedia\1.mp3 I have media element in my XAML page and I am setting its Source like this. mediaElement.Source = new Uri(@"D:\MyMedia\1.mp3", UriKind.Absolute); mediaElement.Play(); but its not playing the media and its giving the error like this MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED : HRESULT - 0x80070005 So someone tell me how I can play some

Awaiting an IAsyncOperation in F#

血红的双手。 提交于 2019-12-11 08:42:10
问题 I have the following code in F#: let CreateSampleDataFromJson<'T>(path) = let uri = new Uri(path) async { let file = StorageFile.GetFileFromApplicationUriAsync(uri) let jsonText = FileIO.ReadTextAsync(file) return JsonObject<'T>.Parse(jsonText) } The problem I'm having is that file is an IAsyncOperation<StorageFile> and not a StorageFile as ReadTextAsync expects. In C# you can do something similar to this: var file = await StorageFile.GetFileFromApplicationUriAsync(uri) i.e. public async Task

What's the difference between Properties/DisplayName element and VisualElements@DisplayName attribute in .appxmanifest file

人盡茶涼 提交于 2019-12-11 08:35:23
问题 In following appxmanifest, what is the difference between Package/Properties/DisplayName element and Package/Applications/Application/VisualElements@DisplayName <?xml version="1.0" encoding="utf-8"?> <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest"> <Identity Name="" Version="" Publisher="" /> <Properties> <DisplayName></DisplayName> <!-- this --> <PublisherDisplayName></PublisherDisplayName> <Logo></Logo> </Properties> <Prerequisites> <OSMinVersion></OSMinVersion>

Windows Store CurrentApp.LoadListingInformationAsync() - error 0x801900cc

末鹿安然 提交于 2019-12-11 08:33:49
问题 I have a Windows 8.1 app on the Store, but when I try to use the next piece of code for a new feature I want to add to my app var listingInfo = await CurrentApp.LoadListingInformationAsync(); I receive an error which I don't exactly know what it means. I did catch the error though and I displayed it on a MessageDialog and then I took a print screen. This is the error: We could not receive your donation due to an unexpected error: System.Exception: Exception from HRESULT: 0x801900CC at System

Is it possible to use tile templates with secondary tiles in a Windows Store App?

百般思念 提交于 2019-12-11 07:50:03
问题 The title is the whole question: Is it possible to use tile templates with secondary tiles in a Windows Store App? Also can secondary tiles animate? It looks like the answer is no, even in Windows 8.1 but maybe I am just missing something. Here is a link to the Tile Template: http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.notifications.tiletemplatetype.aspx Here is a link to the SecondaryTile class: http://msdn.microsoft.com/library/windows/apps/br242183 It's weird because

Windows 8 exception “System.Security.SecurityException”

给你一囗甜甜゛ 提交于 2019-12-11 07:15:52
问题 I am starting to develop windows 8 app. I am new in windows 8 app development. I have one page i.e. MainPage.xaml . I am not able to see the design view. It gives an error. System.Security.SecurityException Designer could not be started because of a permissions issue on the drive to which it is installed. Please check the permissions of the folder before trying to start the designer. at Microsoft.Expression.HostUtility.Platform.AppContainerProcessDomainFactory.CreateDesignerProcess(String

How to switch from MediaElement to BackgroundMediaPlayer on Application lose focus

本秂侑毒 提交于 2019-12-11 07:04:23
问题 I have a music player page like PlayMusic.xaml and it uses MediaPlayer element to play music. I want to switch BackgroundMediaPlayer whenever user clicks back button or Windows Button or Lock Screen. I also would like to continue where ever song is remained. (Like BackgroundMediaPlayer should continue from 30th second) Is there any mechanism in Windows phone like when ever when I lose focus from MediaPlayer I can switch to BackgroundMediaPlayer and continue playing music? Note: I can directly

How to bind view model to a UserControl in MVVMCROSS?

℡╲_俬逩灬. 提交于 2019-12-11 06:16:02
问题 I am using the excellent Mvvmcross and Ninja Coder for Mvvmcross for building a cross platform app. For my windows store app I have created a view and a view model using Ninja coder. I have also created a UserControl which will be referenced in the view. Hence I need to bind the same viewmodel to the User control also. I have been trying to set the Data context of the user control to the singleton instance of viewmodel. I have set the data context of the user control like below. public sealed

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

Microsoft advertising ad units - Device family

独自空忆成欢 提交于 2019-12-11 05:39:56
问题 I'm developing a uwp app, and I finished it and was preparing to submit my app in the store, through the dev center. My application has AdControl advertising, which is presented in the desktop version (Windows 10) and the mobile version (Windows 10 Mobile) through VisualStateManager In the Desktop version I have: <Setter Target="Ad.Height" Value="90"/> <Setter Target="Ad.Width" Value="728"/> In the Mobile version I have: <Setter Target="Ad.Height" Value="50"/> <Setter Target="Ad.Width" Value=