windows-runtime

XAML grouped GridView/Semantic Zoom not displaying all children?

♀尐吖头ヾ 提交于 2019-12-04 12:37:59
I'm attempting to use the XAML C# Grouped GridView sample to make my SemanticZoom work in a XAML C# Windows 8 app. The problem is, for some reason it's displaying the correct header (the category, in this case), but it's not showing all the items under the header (it's only showing one for each, when I have up to 6 items in some of them). Here's the SemanticZoom's XAML code (note that I left out the ZoomedOutView for brevity, and since it's working perfectly): <SemanticZoom x:Name="boardZoom" Height="626" Margin="10,132,10,0" VerticalAlignment="Top"> <SemanticZoom.ZoomedInView> <GridView

How does x:Bind compare with the classical Binding, put as concisely as possible?

邮差的信 提交于 2019-12-04 12:34:58
How is the compiled binding, x:Bind, different from the classical Binding, put as concisely as possible? Compared with the classical binding you cannot use the following binding attributes with x:Bind : ElementName , RelativeSource , Source and UpdateSourceTrigger . Well, that almost sums up the limitations of x:Bind but x:Bind is powerful in its own right -- the notable one being compiled binding and hence the performance gain as a result. See last bullet point for another powerful thing in x:Bind 's armory. One important point to always remember: the data context of x:Bind is the code-behind

WinRT - Loading data while keeping the UI responsive

这一生的挚爱 提交于 2019-12-04 12:19:49
问题 I'm developing a Windows Metro app, and am getting an issue with the UI becoming unresponsive. As far as I can tell, the cause is as follows: <ListView ... SelectionChanged="ItemListView_SelectionChanged" ... This event is handled here: async void ItemListView_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (this.UsingLogicalPageNavigation()) this.InvalidateVisualState(); MyDataItem dataItem = e.AddedItems[0] as MyDataItem; await LoadMyPage(dataItem); } private async Task

How can I get a stacktrace from C++ in WinRT?

懵懂的女人 提交于 2019-12-04 12:17:32
问题 I need to get a stacktrace from a C++ application, and serialize it into a string so it can be parsed later. The only API I've heard of for this on Windows is StackWalk64, which doesn't appear to be supported. How can I get a stacktrace from C++ in a Windows Store app? 回答1: The only way I have been able to debug complex WINRT issues is to use ETW to track causality chains. While kind of tedious to setup This article (while referring to c#) highlights the method: Andrew Stasyuk. Async

Flyout or Popup to display addition info

情到浓时终转凉″ 提交于 2019-12-04 12:09:56
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 myPopup = new Popup(); myPopup.Child = myListView; myPopup.IsOpen = true; So which way should I go, try to

GetFilesAsync stops working

我是研究僧i 提交于 2019-12-04 11:47:19
I've this piece of code public static class Storage { public async static Task<bool> Exists(string filename) { var folder = await Package.Current.InstalledLocation.GetFolderAsync("Assets"); var _files= await folder.GetFilesAsync(CommonFileQuery.OrderByName).AsTask().ConfigureAwait(false); var file = _files.FirstOrDefault(x => x.Name == filename); return file != null; } } and calling it from my Windows 8 Store application; this.IconExists = this.Game != null && Storage.Exists(this.IconName).Result; So if I put a break point on the above line and run it step by step, it works, but without

Possible to use Toast Notifications from a regular .Net application?

可紊 提交于 2019-12-04 11:45:43
I've recently been checking out the samples for WinRT(C#) for Windows Store. One really cool thing I saw was the Toast Notifications. I can think of a million different uses for them, but not a single one that would also be suitable as a windows store application. So, is it possible to use Toast Notifications in Windows 8 from regular .Net desktop applications? Yes you can. Look here for more information. 来源: https://stackoverflow.com/questions/12431523/possible-to-use-toast-notifications-from-a-regular-net-application

Disk space in WinRT using C# in Windows 8

那年仲夏 提交于 2019-12-04 11:22:59
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.LocalFolder; ulong a, b, c; if(GetDiskFreeSpaceEx(appFolder.Path, out a, out b, out c)) Debug.WriteLine

How to print Formatted Page which contain ListBox or GridView

纵饮孤独 提交于 2019-12-04 11:09:42
Printing Document using WinRT : 1) To Keep tracking if there are more data Or text data to print in a formatted page. This can be done using RichTextBlock and RichTextBlockOverflow like below: <RichTextBlock Foreground="Black" x:Name="textContent" FontSize="18" Grid.Row="1" Grid.ColumnSpan="2" OverflowContentTarget="{Binding ElementName=firstLinkedContainer}" IsTextSelectionEnabled="True" TextAlignment="Left" FontFamily="Segoe UI" VerticalAlignment="Top" HorizontalAlignment="Left"> </RichTextBlok> <RichTextBlockOverflow x:Name="firstLinkedContainer" OverflowContentTarget="{Binding ElementName

WinRT Reflection (C++/CX)

梦想的初衷 提交于 2019-12-04 11:07:44
how can I introspect an object in C++/CX? I known how to get its class name (using IInspectable) but I wasn't able to figure out how to get a list of its properties or how to invoke methods if I have just a name of the method (string). I searched for an answer here and at Google but what I found is related to the .NET layer of WinRT (the System.Reflection namespace doesn't seem to be available in C++/CX). C++ doesn't provide any specific APIs to reflect on WinRT types, these types are fully defined in CX compliant metadata files and you can use the CLR native metadata APIs to read their