windows-runtime

How do you animate navigation in Windows 8 Metro Apps?

依然范特西╮ 提交于 2019-12-23 20:18:44
问题 In Metro apps that use HTML it is recommended to use fragments to navigate to different page (explained here). How can you animate navigation between fragments without writing lots of code? 1) The navigate method is shown in many examples, but doesn't seem to have animation control: WinJS.Navigation.navigate('/html/myNextPage.html'); 2) The is a method WinJS.UI.Animation.enterPage, but do you have to give up navigate's history management to use this? Also the documentation is pretty sketchy

How to specify a callback method for IAsyncOperation

核能气质少年 提交于 2019-12-23 20:07:04
问题 Is it possible to specify a method to be called after finishing an async operation? Platform : C++, Windows Phone 8 I need to implement non-blocking method for sending UDP packets asynchronously. And them have my method: onWriteComplete(int errorCode) called back when the operation completes. Here's what I've tried: res = await asyncWrite(); onWriteComplete( res ); But no luck. 回答1: Asynchronous operations work in similar ways across all languages in Windows Phone 8 and Windows RT

Adding TextBox in winRT MessageDialog

[亡魂溺海] 提交于 2019-12-23 19:32:14
问题 I'm working in windows 8 store application and I'm trying to popup a dialog to let the user enter information in a textbox for example. How to do that ? 回答1: The InputDialog control in WinRT XAML Toolkit does just that. It is basically a Popup control with a TextBox and some buttons. There is a sample for it too. The most basic one does this: var dialog = new InputDialog(); var result = await dialog.ShowAsync( "This is the title", "This is the content/message", "Option 1", "Option 2", "Option

AppBarButton.Icon doesn't change on runtime

a 夏天 提交于 2019-12-23 18:34:03
问题 I have a problem updating AppBarButton Icon on runtime depending on some conditions. <AppBarButton x:Name="WeekButton" Click="OnClick" Label="SomeText" </AppBarButton> I'm trying to update Icon property in some code behind with this code WeekButton.Icon = new FontIcon() { Glyph = Runtime_Value_Here}; But nothing happens. The button doesn't change. But in any random time when the code works, It MAY change the button. I always see, that the Icon is new in code, but not on screen. None of the

Detect Desktop availability from Metro application (detect ARM, detect Windows RT system)

删除回忆录丶 提交于 2019-12-23 18:23:00
问题 This is a question related to Get OS-Version in WinRT Metro App C# but not its duplicate. Is there any option to detect from a Metro application whether there is the desktop feature available on the system? I understand that detection of the OS version is not supported and that is OK imo. However my metro app needs to know whether there is a Desktop available on the system it is running on. By Desktop I mean extendable desktop - desktop, where 3rd party desktop applications can be installed.

How do I make a hybrid app in Windows 8?

馋奶兔 提交于 2019-12-23 18:16:13
问题 How does Google Chrome make a hybrid app (i.e. one that works on the desktop and one that works out of the Modern UI, and that are switchable)? What new Windows API do they call? 回答1: The only applications that can be "hybrid" are browsers. See here (link to Microsoft whitepaper on making a browser desktop and metro enabled). 来源: https://stackoverflow.com/questions/13218928/how-do-i-make-a-hybrid-app-in-windows-8

How do I get Geolocation of a street address in Windows Phone 8.1 Universal App?

放肆的年华 提交于 2019-12-23 17:06:03
问题 My windows phone user will be typing in a street address in a text field. I need to get the geolocation of that address string so I can later calculate distance of that geolocation and the phone's current address. So, my question is: How do I get Geolocation of a street address in Windows Phone 8.1 Universal App? I found a solution in this stackoverflow answer, however, it's for the old Silverlight apps and not the new Universal Store app APIs that I'm currently using. 回答1: Here is the code

ListView.ItemContainerStyle IsSelected property does not seem to affect selection on WinRT

一个人想着一个人 提交于 2019-12-23 16:42:12
问题 I was trying to use IsSelected set directly to true (w/o binding) during debugging of an issue (at the end I am trying to use binding, but have found that even w/o binding this does not work). The following code works fine in WPF (all items selected) but does not work on WinRT (no item selected after execution). Is this a bug/feature? The following XAML will compile in a WPF window and in a WinRT page.. <ListView SelectionMode="Multiple" HorizontalAlignment="Stretch"> <ListView

How to display images from Picture Directory ?

删除回忆录丶 提交于 2019-12-23 16:34:10
问题 I want to display pictures in the Pictures library. I get pictures and bind data. StorageFolder picturesFolder = KnownFolders.PicturesLibrary; IReadOnlyList<StorageFile> myPictures = await picturesFolder.GetFilesAsync(); var mydata = from file in myPictures select new { Subtitle = "subtitle", Title = "title", Image = this.getImage(file.Path) }; this.DefaultViewModel["Items"] = mydata; This is getImage() for set BitmapImage. private async Task<BitmapImage> getImage(string finename) {

Windows 8 button disappearing when mouse over

我是研究僧i 提交于 2019-12-23 16:33:22
问题 I have a settings control as follows (I promise I didn't really call my buttons button_1 and button_2): <UserControl x:Class="App1.SettingsPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="646"> <Border BorderBrush="#FF590151"