windows-runtime

How to set Background of a Button without flicker?

送分小仙女□ 提交于 2019-12-11 10:08:09
问题 I am trying to change the Background of a button to an image source. I want to load that image in memory when we navigate to the page so that it doesn't flicker the first time it shows. On Windows Phone, I was able to create the image source as such: StreamResourceInfo resourceInfo = Application.GetResourceStream(uri); BitmapImage bitmapSource = new BitmapImage(); // Avoid flicker by not delay-loading. bitmapSource.CreateOptions = BitmapCreateOptions.None; bitmapSource.SetSource(resourceInfo

Does protobuf-net support Windows RT?

无人久伴 提交于 2019-12-11 10:07:55
问题 Is it possible to use the protobuf-net library in an application that targets Windows RT? I tried adding it via NuGet to my project but I receive this error: Successfully installed 'protobuf-net 2.0.0.480'. Successfully uninstalled 'protobuf-net 2.0.0.480'. Install failed. Rolling back... Could not install package 'protobuf-net 2.0.0.480'. You are trying to install this package into a project that targets '.NETCore,Version=v4.5', but the package does not contain any assembly references that

MVVM: How to call method on view from view model?

天涯浪子 提交于 2019-12-11 09:58:46
问题 I am quite new to MVVM, so sorry for probably simple question. However, I can not understand which mechanism from MVVVM (I am using MVVMLight if that is of any consequence) to use in order to program the simple following scenario: I have textbox TB, where user can fill in URL. Than I have a button B and webview WV. If user clicks on button, the app should take the text from TB and display it in the WV. I knwo that I can create a property in viewmodel and bound it to TB.Text. I understand

Vertical scrolling for HubSection content

落爺英雄遲暮 提交于 2019-12-11 09:57:41
问题 I am working on Windows Phone 8.1 app (Windows Runtime)and I have created a page with the following layout : <Grid Grid.Row="1" Margin="0, 10, 0, 5" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <maps:MapControl x:Name="LocationMap" Grid.Row="0" Height="220" MapServiceToken="..."/> <Hub Grid.Row="1" Margin="0, 25, 0, 0"> <HubSection Header="ABOUT" x:Name="AboutHubSection"> <DataTemplate> <Grid> <Grid.RowDefinitions>

WinJS.UI.ListView horizontal

江枫思渺然 提交于 2019-12-11 09:57:31
问题 Have a few items and want to display them horizontally and need them to wrap to next line when not enough space. <div class="historyItem"> <div id="testTemplate" data-win-control="WinJS.Binding.Template" style="display:none"> <div class="itemTemp"> <h6 data-win-bind="innerText: desc"></h6> </div> </div> </div> <div id="listViewForecast" data-win-control="WinJS.UI.ListView" data-win-options="{itemTemplate:testTemplate, selectionMode: 'none', tapBehavior: 'none', swipeBehavior:'none', layout:

Access Denied (HRESULT 0x80070005) in new ControlChannelTrigger (WinRT)

这一生的挚爱 提交于 2019-12-11 09:38:48
问题 I an in complete despair... Here's my code: ControlChannelTrigger theChannel = new ControlChannelTrigger("channelId", 15, ControlChannelTriggerResourceType.RequestHardwareSlot); which always throws an UnauthorizedAccessException (HRESULT 0x80070005). Here's a manifest I use <?xml version="1.0" encoding="utf-8"?> <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest"> <Identity Name="cf45d5c8-2936-4d1f-9075-51a87ceb60ba" Publisher="CN=snuk182" Version="1.0.0.0" /> <Properties>

BitmapImage SetSource Crashing/Freezing App

我的未来我决定 提交于 2019-12-11 09:32:59
问题 I am trying to set the image from a stream. However when I set the source from the background thread and use a dispatcher it freezes the app completely. The stream is not null, I have verified that. I am using the taglib api to get the stream of the album picture of an mp3 file. I've tried everything. async void Background(object sender, MediaPlayerDataReceivedEventArgs e) { IRandomAccessStream AlbumArtStream = await Media.GetAlbumArt(MediaFile.Name, await MediaFile.OpenStreamForReadAsync());

How Can I Launch The App-store App Directly from my Application

烂漫一生 提交于 2019-12-11 09:19:33
问题 I want to place a button or a link in my app with which the user can start the app-store and buy my app if the app is in trial mode. I can not find any relavant Information on this. How can I implement this? 回答1: MSDN documentation: Creating links with the Windows Store protocol. Alternatively, the URI for the app in the store can be accessed using the Windows.ApplicationModel.Store.CurrentApp.LinkUri property. You can then open a link to your app in the store using Windows.System.Launcher

How can I play mp3 files stored in my Windows Phone 8.1 solution?

让人想犯罪 __ 提交于 2019-12-11 09:08:32
问题 I have a number of mp3 files stored in my solution at the location /Resources/mp3Files/ In Windows Phone 8 I was able to play these with the following: var name = track.Item1; var uri = new Uri("/Resources/mp3Files/sound.mp3", UriKind.Relative); var song = Song.FromUri(name, uri); FrameworkDispatcher.Update(); MediaPlayer.Play(song); However, in Windows Phone 8.1 this doesn't work. What do I need to do to play mp3 files I have stored in my solution? 回答1: You need to use MediaElement in

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