windows-runtime

Pin tile to selected position on Startscreen (programmatically) Windows 8

橙三吉。 提交于 2019-12-06 02:42:39
I am searching a solution to pin an installed app or desktop application to the windows 8 startscreen. I have figured out to do this like it is described in this post before There has also been a long disscusion about this problem But there was no answer to my question: How can I pin a new tile to a selected position on the startscreen? If I install a new app/application windows 8 pins the new application at the end of the Startscreen. (windows 8.1 does not) But if I want to place the tile f.e. in the second group on third position , there is possibilty to do this. I am in an enterprise

Saving data during the OnSuspending method

混江龙づ霸主 提交于 2019-12-06 02:36:36
For a Windows 8 Application in C/XAML I have to store some data to the LocalState folder. I have some trouble using async/await operator I think. When I am saving datas while the application is running, everything works fine, but when I try to save the data during the OnSuspending method, it seems that my application doesn't wait for my saving method to be finished to suspend the application. The stranger thing is that when I'm debugging and doing all the operation step by step slowly everything works fine, but when I don't put any breakpoints, the application is closed before the data are

WinRT as a replacement of Win32 API

痞子三分冷 提交于 2019-12-06 02:22:08
问题 Over internet there are many blogs saying that winrt is a replacement of win32 api. IS this is really true? Even i read that application developed for Metro Application uses winrt. So do i understand correctly, those application which are metro application they has to go through winrt & classic applications has to go through win32 api's. Please someone validate my conclusions. 回答1: Disclaimer: I am not involved in any way in the design or implementation of Windows 8, and I have only kept up

Windows 8.1 how to automatically wrap grid items?

主宰稳场 提交于 2019-12-06 01:53:20
I'm building a universal app and my Win8.1 app has to show a grid of items. Normally the grid consists of 3 columns, but on smaller screens I want the items to wrap so that there are only 2 columns (or even 1). This is my code: <GridView ItemsSource="{Binding Regions}" IsItemClickEnabled="True"> <GridView.ItemsPanel> <ItemsPanelTemplate> <ItemsWrapGrid Orientation="Horizontal" MaximumRowsOrColumns="3" MinWidth="400" /> </ItemsPanelTemplate> </GridView.ItemsPanel> <GridView.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal" Margin="10"> <Image Source="{Binding Code, Converter=

How to debug a Windows Store app that crashes on a customer's machine?

核能气质少年 提交于 2019-12-06 01:51:11
I got a support email from a customer saying his app crashes when it starts and all he gets is a message like: (App Name) ran into a problem You can send info to Microsoft about what went wrong to help improve this app. Files that will be sent to Microsoft C:\Users\User_Name\AppData\Local\Temp\WER####.tmp.appcompat.txt C:\Users\User_Name\AppData\Local\Temp\WER####.tmp.hdmp I thought - Microsoft isn't going to help them really with my silly app. They should send the dump file to me for debugging, but how to do it? A sample dump file I got from a crashing app was 90MB and after zipping it is

How to append array of bytes to the existed StorageFile?

喜你入骨 提交于 2019-12-06 01:49:13
问题 I need to write to a file data by chunks of bytes consequentially (in my Metro app) and there is a class FileIO with methods AppendTextAsync and WriteBytesAsync but without needed AppendBytesAsync so how can I append an array of bytes to a StorageFile ? 回答1: This code seems to work for me: String s = "hello"; Byte[] bytes = Encoding.UTF8.GetBytes(s); using (Stream f = await ApplicationData.Current.LocalFolder.OpenStreamForWriteAsync ("hello.txt", CreationCollisionOption.OpenIfExists)) { f

How to check if file exists in StorageFolder in WinRT [duplicate]

可紊 提交于 2019-12-06 01:32:49
Possible Duplicate: Check if a file exists in the project in WinRT I'm using the StorageFolder and need to check if a file exists befor I read it to avoid a exception. my code looks like this: StorageFolder storageFolder = ApplicationData.Current.LocalFolder; StorageFile sampleFile = await storageFolder.GetFileAsync(myPath); the problem is, I can't find a method which checks if a file exist Last time I checked you had to catch an exception: (might have changed) Edit: this is one way to do it :) Like so: static async Task<bool> DoesFileExistAsync(string fileName) { try { await ApplicationData

How to get feedback from MediaCapture API in Windows 8

偶尔善良 提交于 2019-12-06 01:28:33
问题 I'm trying to do face tracking apps in Windows 8 app. And I aware that in order to access the camera stream, I have to use MediaCapture.AddEffectAsync() which has to be done incorporate with C++ as shown in this sample. Now I'm able to access the stream and track the face, but I'm not able to pass/return the tracking face coordinate to C# for further processing. One way I've tried is to invoke C# method in C++ to pass back the tracking coordinate. But no avail, because Visual Studio doesn't

How does a container know when a child has called InvalidateArrange?

橙三吉。 提交于 2019-12-06 01:25:10
问题 I'm trying to learn the basics of creating a custom panel in a WinRT XAML app. I have defined an attached dependency property and it's working as expected except i can't figure out how to get the property's callback for a child element to trigger the arrange or measure of the container. What's the proper way to for a child to let it's container know that arrange and measure should be called again? In my WPF 4 unleashed book they use the FrameworkPropertyMetadataOptions.AffectsParentArrange

Is FluidMoveBehavior available?

你。 提交于 2019-12-06 01:23:43
I have calls to Grid.SetRow and Grid.SetColumn in my code which I'm trying to animate. According to the answer at http://social.msdn.microsoft.com/Forums/en-CA/wpf/thread/257779f7-b459-43fc-a4a1-f24641c50e09 , it is recommended to make use of FluidMoveBehavior, but it doesn't look like this is available for Windows 8. What are my options for animating the children of a Grid when their positions change? I'm basically looking for a way to achieve linear transition. There is a new built-in feature called Transitions that can be used, here is an intro . Try adding a RepositionThemeTransition to