windows-runtime

Flyout or Popup to display addition info

南笙酒味 提交于 2019-12-06 06:33:22
问题 I want display popup on top my app with additional information, my info is Listview with ~500 items I've tried both: problem with flyout -> it has probably scrollViewer inside so my listview doesn't Virtualize correctly everything else is ok. There is my code: Flyout myFlyout = new Flyout(); myFlyout.Placement = FlyoutPlacementMode.Full; myFlyout.Content = myListView; myFlyout.ShowAt(this); problem with popup -> it isn't centered, verticalAlignment doesn't work, horizontal neither Popup

Windows RT .NET compatibility

徘徊边缘 提交于 2019-12-06 06:21:54
I just need to know if I need the same framework to develop an app for Windows 8 for Tablets (Windows RT) and PCs or the tablet one still uses .NET compact framework. The only type of applications that run on Windows RT (ie. the Tablet/ARM version of Windows 8) are Windows Store Apps. These are full-screen applications that run on top of the WinRT API. You can use a subset of .NET 4.5 on these devices, and use XAML to build your interface just like you would with WPF on the desktop. You can read more on MSDN - .NET for Windows Store apps overview . This article describes a lot of the changes

Disk space in WinRT using C# in Windows 8

不羁的心 提交于 2019-12-06 05:56:14
问题 I got two solutions but both are not useful for me. Solution 1: kernel32.dll (its working code) Note: But I don’t want to import any dll in my application. b/c its problem with market place submission. [DllImport("kernel32.dll", SetLastError = true)] static extern bool GetDiskFreeSpaceEx( string lpDirectoryName, out ulong lpFreeBytesAvailable, out ulong lpTotalNumberOfBytes, out ulong lpTotalNumberOfFreeBytes); static void TestDiskSpace() { IStorageFolder appFolder = ApplicationData.Current

How to Turn Off Automatic Termination of Suspended Apps

坚强是说给别人听的谎言 提交于 2019-12-06 05:38:33
问题 I'm trying to debug my Windows Store App when it gets suspended (trying to prevent my server app from kicking my WSA client when it gets suspended and stops responding to keep-alive messages). But Windows keeps terminating my app almost immediately after it suspends it. Is there a way to prevent Windows from terminating suspended apps? I've searched the interwebs and the group policy editor for such a setting, but the best I can find is a setting to prevent it from auto-terminating apps on

Creating hub page with different controls in Windows 8

南笙酒味 提交于 2019-12-06 05:25:10
问题 The most landing/hub pages you see are just a GroupedGridView ( for example the actual marketplace app ) But I would like to have a Grouped hub page with different controls. For example my first control is a ListView that contains some categories. 2nd and 3th control are GridViews with several items in them. If all 3 controls were GridViews I could easily get this working but it's not. I can't seem to find a working combination of ScrollViewer with a Grid or Stackpanel to get the actual full

How do I mix Light and Dark themes in a C#/XAML Windows Store (Metro UI) App?

十年热恋 提交于 2019-12-06 05:24:56
问题 According to MSDN, the standard way of setting your app theme is to set RequestedTheme="Dark" or RequestedTheme="Light" on the toplevel Application instance. This works great for simple apps but many times I find myself wanting to change the theme of an individual page or even an individual control (e.g. a light-themed text edit page vs a dark-themed image viewer in the same app). XAML controls have 10s or 100s of visual states and color definitions and setting each one of them by hand is

WinRT preload images

孤者浪人 提交于 2019-12-06 05:23:19
I have a Windows 8.1 XAML app where I'd like to preload images before navigating between pages. The naive code I have now is: // Page1.xaml.cs private void Button_Click(object sender, RoutedEventArgs e) { Frame.Navigate(typeof(Page2)); } And on the second page: // Page2.xaml.cs this.image1.Source = new BitmapImage(new Uri("ms-appx:///Assets/image1.jpg")); this.image2.Source = new BitmapImage(new Uri("ms-appx:///Assets/image2.jpg")); Now, when I click the button to navigate, I can see the images being loaded and showing up one at the time. I would like to pre-load the images on the button click

Debugging a Windows Phone 8.1 Unit test (Visual C++)

寵の児 提交于 2019-12-06 04:52:19
The issue is that I have created an Universal App for Windows 8.1 and Windows Phone 8.1 choosing in the wizard Visual C++ -> Store Apps -> Universal Apps -> Windows Runtime Component. So to test its behaviour we have created a Windows Phone 8.1 Unit test project (also Visual C++) where we add as reference the Universal App project, and also in the project properties in the tab Configuration properties -> C/C++ -> General, in Additional include directories I referenced the Universal App (specifically the folder .Shared of the Universal App). Then we add also some .lib to this Unit test project

Catch an async lambda exception

瘦欲@ 提交于 2019-12-06 04:42:36
I am working on Windows 8 (using C#) and when using the async keyword there's a scenario where i can't seem to handle exceptions well. The scenario involves launching an async lambda, posting it to run on the UI thread. Exceptions that occur during the execution of the lambda code gets re-thrown on the calling thread, with no ability to catch them properly. Example: this block of code is executed on some worker thread, and tries to schedule work on the UI thread: await Window.Current.Dispatcher.RunAsync (CoreDispatcherPriority.Normal , async () => { var result = await CurrentAppSimulator

How to get access to WriteableBitmap.PixelBuffer pixels with C++?

本秂侑毒 提交于 2019-12-06 04:37:33
问题 There are a lot of samples for C#, but only some code snippets for C++ on MSDN. I have put it together and I think it will work, but I am not sure if I am releasing all the COM references I have to. 回答1: Your code is correct--the reference count on the IBufferByteAccess interface of *buffer is incremented by the call to QueryInterface , and you must call Release once to release that reference. However, if you use ComPtr<T> , this becomes much simpler--with ComPtr<T> , you cannot call any of