windows-store-apps

How to properly wait for asynchronous WinRT callback functions to stop?

一曲冷凌霜 提交于 2020-01-25 21:52:08
问题 I asked a similar question before but the answer there did not satisfy my requirement. Let me explain. I call the following code from a DLL to perform a WinRT operation on Windows 10 from a Windows Store app. The code uses WRL: #include <Windows.Services.Store.h> #include <wrl.h> auto onAppLicCompletedCallback = Callback<Implements<RuntimeClassFlags<ClassicCom>, IAsyncOperationCompletedHandler<StoreAppLicense*>, FtmBase>>( [](IAsyncOperation<StoreAppLicense*>* operation, AsyncStatus status) {

Installation Failed after creating UWP with Desktop App Converter

前提是你 提交于 2020-01-25 12:54:17
问题 I decided to have another crack at converting my tool (https://github.com/mikecann/Windows7-Taskbar-Monitor) to a windows store app using the Desktop App Converter. Things I did this time: 1) Force-updated my machine to the anniversary update. 2) Downloaded Desktop App Converter and .wim file. 3) Setup the base image .wim 4) Ran the converter on my self-extracting installer with the following: .\DesktopAppConverter.ps1 -Installer C:\tmp\TaskbarSystemMonitorInstaller.exe -InstallerArguments "

Where to start on a tile view

白昼怎懂夜的黑 提交于 2020-01-25 07:51:26
问题 I would like an exact copy of the windows 8 startpage (or windows phone if you like) as a control in my WinRT application.. Like this one in silverlight telerik but than for WinRT Must be clickable (the easy part) and dragable (the hardest part) I've been searching for examples but couldn't find any good.. does anybody has a good starting point or tip? 回答1: You should try Telerik HubTile. Telerik offers different types of tile type Windows 8 Style Tiles Rotating and Sliding Tiles Other Tile

Get unread emails from exchange in Windows 8 Store App

微笑、不失礼 提交于 2020-01-25 05:43:55
问题 I want to write an App (Windows Store App) which should display all my unread emails. I did my research at google and msdn but found nothing suitable. The problem is as follow, my development pc does not have any connection to a exchange server, so I had to write an app (C#/XAML) which should later on work: On every PC in the organisation Uses the default credentials of the user Displays the unread emails Is it possible to get these information (Emails) by asking the EWS? Is there a WinRT

VS Express 2013 for Windows does not halt at the (async) line that throws an exception

泄露秘密 提交于 2020-01-25 02:17:25
问题 I am very new to async programming. When an exception is thrown, I am used to Visual Studio to halt at the erroneous line. In a code like the following, the debugger normally stops and highlights line 2 int[] array = new int[] { 0, 1, 2 }; int throwsException = array[3]; But when an exception occurs in a method that is called with await , than I am completely lost and the debugger simply stops at the await line. public async void ThrowException() { int[] array = new int[] { 0, 1, 2 }; int

Cannot find type System.ApplicationException in module mscorlib.dll Error in Windows Store App while using Matlab dll

馋奶兔 提交于 2020-01-24 17:17:25
问题 I am making an Image processing App for my own use which I don't want to put on store. I want to use my pre designed Matlab codes in that windows store app. When using the dlls in my project, it displays the error - Cannot find type System.ApplicationException in module mscorlib.dll 回答1: Most probable cause for this exception is the DLLs which you are referencing or their dependencies are not supported by WinRT Try to use LoadPackagedLibrary or GetProcAddress to load DLLs. If you cannot then

Updating ObservableCollection from non UI thread

时光总嘲笑我的痴心妄想 提交于 2020-01-24 15:42:06
问题 I am working on a Windows 8 Store app. I have a timer that calls a delegate every two minutes and makes an async web request. The resulting data is added to an observablecollection that is bound to a UI element. Doing this throws an exception because the UI is being modified on a non UI thread. In other places in my code I have done this await Window.Current.CoreWindow.Dispatcher.RunAsync( CoreDispatcherPriority.Normal, async () => { ui code here } But this is causing a crash with Window

How can I automatically show a tooltip if the text is too long?

安稳与你 提交于 2020-01-24 12:36:00
问题 In a Windows Store Application I have the following TextBlock: <TextBlock Text="Seriously long text for the purpose of showing tooltip" TextTrimming="CharacterEllipsis" /> How do I automatically show a tooltip when the text is too long to display without an ellipsis? 回答1: Here's my solution, based on this and this. First, create an attached property to enable auto tooltip: public static class TextBlockUtils { public static readonly DependencyProperty AutoTooltipProperty = DependencyProperty

How can I automatically show a tooltip if the text is too long?

℡╲_俬逩灬. 提交于 2020-01-24 12:33:14
问题 In a Windows Store Application I have the following TextBlock: <TextBlock Text="Seriously long text for the purpose of showing tooltip" TextTrimming="CharacterEllipsis" /> How do I automatically show a tooltip when the text is too long to display without an ellipsis? 回答1: Here's my solution, based on this and this. First, create an attached property to enable auto tooltip: public static class TextBlockUtils { public static readonly DependencyProperty AutoTooltipProperty = DependencyProperty

WinJS, display image from a byte array?

穿精又带淫゛_ 提交于 2020-01-23 02:46:07
问题 I'm looking for a way to display a JPEG image stored in a byte array. This is a Windows 8 Store App built in Javascript. The byte array is returned from a C# WinRT component. Its type in C# is byte[] . Basically, what I want is to get an object so that I can call: URL.createObjectURL(bytearray, {oneTimeOnly: true}); upon. Currently this generates a runtime error because the array interface is not supported. Thanks in advance. 回答1: I discovered a far easier method. var blob = new Blob([bytes],